Automated testing

This PR includes substantial changes. It adds automated testing using phantomjs and my micro test runner, "drone". I have updated the project README with how to run the tests. Next step is configuring the tests to run from Travis CI.