Related fdo#60338: Restrictive open mode flags for tempfile w/o calling umask

Change-Id: Ia83cbe4c9352eb2a2cf317dd1fc5771ddc12c993