Update specs to run in node.js instead of in the browser

This allows the tests to be automatically run during development, using jasmine-node. It could also be run on a continuous integration server.