Updated test harness to work with Python3 and Python2.7, with legacy support for Python 2.6 and below