Smarter imports so that tests can be run standalone or through unittest_main.py (without extra appends to sys.path)