Mocha Tests

Adds tests and phantomjs which allows them to be run from the command line fixes #4