Change to expansion of HOME instead of ~ for homedir.