Convert run tests to python

Convert the run tests scripts fro shell to python, so it's easier to hack and extend,
Right now, it's meant to do exactly the same as the replaces shell code.
@gurneyalex I have quite the opposite impression: using a straight text string instead of a list of parameters looks closer to the original shell script and easier to check for correctness. I'm not sure the piping used will work correctly and it would take additional effort to find out.

@bwrsandman Again, at this moment not to get too far away from the original script is a design goal; I agree it makes sense but I would rather not add those complications at this point.