Fix exception in file.js
78cd547
If file is destroyed and stream ends afterwards, then an exception is thrown because self._torrent is undefined.