Added tests.

Basically added tests for this module and the changes needed to reflect this (e.g. adding Mocha dependency to package.json).  Thanks and have a look!