Shorten delays and add tests.

* Shorten the process.exit() delays so they fit within the mochajs
  timeouts.
* Add tests for error handling.
Bump version number.