Added tests and testing framework. Switched to use promises

Now you can install the project using node so that testing deps are met.