Added tests, fixed imports, added __init__ files

* added the test directory and two test files - we will be using
  nosetests to run the test

* fixed all the imports so that they are intrapackage imports,
  ie "from .. import blah"

* added __init__.py files so that the code is treated as a package