Fix last commit: Missed to honor HOMEPATH and second usage of function.