'Return the system-defined home directory of the system user account with
the name C{avatarId}.'

def getHomeDirectory(self, avatarId):

    path = os.path.expanduser(('~' + avatarId))
    if path.startswith('~'):
        raise cred_error.UnauthorizedLogin()
    return filepath.FilePath(path)
