Fixed cleanup bugs in the test scripts.