fix run_tests.sh to support python debug builds
fix tests to support python 2.6