JavaScript tests

This adds a number of selenium tests for the JavaScript functionality. It includes an integration with SauceLabs so Travis will be able to run them.

Note: I'm still not sure if the integration with SauceLabs will work, creating the PR is the first test of it.