Revert "Ensure temp files are only accessed by the correct thread"

This reverts commit bafb474a6c2de0bd20dea3503358af138f59394f.