Add more error checking on test errors.

in collectTestReport(), do error checking for errors while executing
script.