Fix issue where resubmitted jobs would not have the correct temporary directories.