Add mocha tests and npm scripts

Resolves #24