Add tests, travis-ci integration
Automatically rewritten for npm.