Added setup.py for distribution as a console script and made the tests runnable using setup.py test