Use finally clause for setting back umask
Merge pull request #11971 from holmboe/finally-umask

Use finally clause for setting back umask