Replace test script with standard setup.py

To run tests (and do other tasks like tarball creation) use a standard
setup.py file.