Fixed running tests with Karma

Hey,

Here's a fix for running the tests with Karma, it's really easy now:

1. npm -g install karma-cli
2. npm install # to install qunit and PhantomJS locally
3. karma start # to run the test!

Let me know if you like to see any changes... BTW, once it's merged, one could add Travis CI support...

Cheers, Philip