Improve temporary file handling to not collide with likely filenames in /tmp