look into "tmpdir" etc for storing and reading these temp files.

Should play nicer on w32 as well.