Fixed all karma and mocha tests

Here's the pull request to fix the unit tests.

My main problem running the unit tests seemed to be the express-cluster running the tests on all the processes. After that phantomjs would hang on and cause problems even running the dev environment. I made a change to server.js to not use cluster mode for tests only. I am not sure if this is the best way to go about this so I'm open to suggestions.

Build ran (and passed) in travis!