User existence checking

In our deployment we have some user folders (e.g. /Users/template) that
exist though the user ‘template’ does not. Now if ‘template’ is
specified as the user name, it will first check for the existence of
the ‘template’ user’s home directory (which will fail) and then attempt
to find /Users/template. If that is successful, it will continue with
that path.