waf uninstall (via BuildContext.install() in Build.py) removes empty directories all the way up the directory tree. This means that it removes test_tmpdir and any empty directories above it. While this is arguably a waf bug, the simplest solution is to make test_tmpdir non-empty so it don't get removed.
Created attachment 13146 [details] Patches for v4-6-test
Reassigning to Karolin for inclusion in 4.6.
Pushed to autobuild-v4-6-test.
(In reply to Karolin Seeger from comment #3) Pushed to v4-6-test. Closing out bug report. Thanks!