runtest.pl revised and cleaned up