Fix error where this.emit('error', error); doesn't exist
Merge pull request #675 from hexid/fix-windows-tests

Fix error where this.emit('error', error); doesn't exist