[fix] error reporting

this.emit('error', ...) fails because `this` is lost in the callback function scope
Merge pull request #8 from jsmarkus/patch-1

[fix] error reporting