Temporary directory cleanups in tests
The commits in this merge request were cherry-picked from !287 (closed) and reworked somewhat.
See the commit messages for details.
The commits in this merge request were cherry-picked from !287 (closed) and reworked somewhat.
See the commit messages for details.