fix: Use correct umask when populating primary cache from secondary
Util::get_umask retrieves the process's umask and caches it to avoid
some system calls. This doesn't interact well now when using UmaskScope
to change umask temporarily since Util::get_umask then only sometimes
returns the correct value. This leads to the incorrect umask being used
when writing cache entries to the primary storage for secondary storage
hits.
Fix this by not caching the umask system call.
Closes #1087.
(cherry picked from commit
6484cdfa0f22214d91cd61562f48d4d9060d2533)