In windows, (by default?) a file can only be opened by one process. The
that File::Temp returns is a filehandle opened for writing. Your
command starts another process which tries to write to the same file, but it's locked by the first process. On *nix, more than one process can write to a file at the same time.