#551658 follow-up by pwolanin: Revert back to D6-style temporary folder logic to avoid various platform issues.