Make home directory search cross platform