[BUGFIX] Check whether realpath exists in runTests.sh