Cleanup regrtest.py

* Move code into a new _main() function
* Fix loop to cleanup sys.path
* Remove unused import
1 file changed