Tests: Replace hardcoded `/tmp/` references with `get_temp_dir()`.
This allows more tests to pass on Windows.
Props danielhuesken, DJPaul, christophherr, joemcgill, netweb, davidbaumwald, SergeyBiryukov.
Fixes #40856, #39975.
git-svn-id: https://develop.svn.wordpress.org/trunk@48464 602fd350-edb4-49c9-b593-d223f7449a82