Fix tests for node v0.11.x

[Sinon](http://sinonjs.org/docs/#spies) and [nvm](https://github.com/creationix/nvm) to the rescue. Threw in jshint pretest for giggles.