refactor -- replaces exception with sys.exit() call
refactored test to work with Python 2.6, 2.7, 3.3, and 3.4