Organize testing to use pytest and a few small changes to get more tests passing

All tests can now run with `python setup.py test`

To run individual test files, install pytest and pytest-cov packages and run `python -m pytest -s path_to_test_file`