Convert run_tests.sh to a Python script (#498)

Replaces run_tests.sh with run_tests.py for long term maintablility.
I also miss the final check with `git diff`, which might have slipped through.