master: more narrow scope for unmask

Previously umask could be left as 191 (0277) in some cases.

Though it still needs try/finally, but that's probably another problem
that should be fixed globally via context manager for all umask
changes, e.g.::

    with salt.utils.umask(191):
        do(stuff)
master: fixed direct user query via getpwnam

Previously founduser was set but unused.
Merge pull request #9771 from SaveTheRbtz/minor-bugfixes

Minor bugfixes