runtest.pl revised and cleaned up
Merge pull request #518 from tauli/master

runtest.pl revised and cleaned up