Allow running the tests with `npm test`

Also, make sure `npm install` installs the test dependencies.