Fix an test teardown issue and use `nosetests`