Ensure 'complete' event is emitted if 'error' event handler had an exception

Fixes #59.