Note to self: The 'tempfile' function does *not* default to
removing files with the program exits!
For stable-1.4 branch:
- Cherry picked from commit
10ea14a3f1adb7023dd0601e4759bd24a030a1c3
- Rebased
my $os = $oses->{$root_dev};
mount_operating_system ($g, $os, 0);
-my ($fh, $tempname) = tempfile ();
+my ($fh_not_used, $tempname) = tempfile (UNLINK => 1);
# Allow this to fail in case eg. the file does not exist.
$g->download($filename, $tempname);