Unit tests

I've added some unit tests, and I've modified `package.json` so you can do this to install mocha when you are in the code's base directory:

    npm install

and this to execute the tests:

    npm test