Fix a bug with pathes to temp files.