Fix tests to run with mocha

I've developed a liking to the mocha test framework, so I opted to use it as
well as make the `npm test` command work.