move tests and fix setup.py

This moves the tests into tests and added code in setup.py to
automatically read in packages.