added user_encoding to AgentImportFile and ResourceImportFile
fixed creating tempfile