iojs/io.js — pull request #81 by mafintosh (2014-12-05 13:32:23+00:00)
Title: fs: fix fd leak on early readstream destroy

Currently the following leaks a file descriptor

``` js
var fs = require('fs')

var rs = fs.createReadStream('my-file.txt')

rs.on('close', function() {
console.log('i am never fired')
})

rs.destroy()
```

In fact if you call `rs.destroy()` before `open` has been emitted in general the read stream never closes.

This PR fixes that by calling `.close()` when the file descriptor is opened incase the stream has been destroyed in the meanwhile