Added new tests, hacked around sys.path bug, fixed other bugs.