testrunner: Prevent simultaneous temporary directory access during exit