Composer project

I update your source code to  to make it compatible with Composer. I do not know if you're interested.
With my modification you must install your project by [composer](http://getcomposer.org/) and declare it on [packagist](https://packagist.org/). I write also some unit tests