Initial implementation of scpGetCache, add func GetTempDir
Fix incorrect assignment