Fix running the tests under nosetests