Add 'npm test' and travis CI integration.

Hook up our test suite so that it runs correctly in node; add a travis-ci configuration so that it stays that way.