Adding support for more negative testing.

spawn can (and does) throw errors. ChildProcess also emits errors. In order to test for these edge cases, it is necessary to have mock-spawn mimic this behavior. I have added the ability to throw an error, and I have added testing for the ability to emit an error as well (the behavior was already there but undocumented).