Update python test script to work with python3

Allow `make` to run in environments with python3.