Two fixes for testsuite.sh
- Fix for when the parent directory can't be written to - use a tempdir instead, and clean it up when we're done.
- Fix basename usage - it can't be handed multiple files at a time, so call it once per loop. This can occur if there were multiple test failures.
Example of the basename problem: https://ci.debian.net/data/autopkgtest/unstable/s390x/o/openmolcas/9503342/log.gz