Test updates

This adds support for mocha tests via Node.js. 

They can be run via `npm test` (replaces karma runner) or `gulp mocha`. Tests automatically run after new builds with `gulp watch`