Fix low-urgency security vulnerability: writing files to arbitrary directory by hijacking temp directories.