Automated pulling of dependencies and running tests

Sorry about not rewriting the tests before - I was fairly unexperienced/unknowledgeable at testing then.

This PR is to add support for automation via NPM, [Bower](https://github.com/bower/bower), [Grunt](http://gruntjs.com/), and [Karma](http://karma-runner.github.io/).

This allows you to install dependencies with

    npm install
    bower install

You can run the tests by just entering `grunt` in the command line afterwards.