Implement tests

As per reddit comment/mail I think automated tests would be nice.

I was thinking of implementing it with [jasmine](http://pivotal.github.io/jasmine/) (+ [jasmine-node](https://github.com/mhevery/jasmine-node)) like I did recently in [parallel.js](https://github.com/adambom/parallel.js) (see vendor for jasmine and test for ... well, the tests). Any objections/other suggestions?