Fix user home directory when running as root or non-sudo user