fixed bugs in runTests.sh