Fix error writing tmp file using plugin with remote unix system