Add code to clean up when run by python 3
Also clean whitespace
Merge pull request #44 from matsjoyce/test_nested_fix

Clean up after test_nested.py is run with python 3