Added platform specific code for Mac OsX to detect homedir by specified username.