Refactor the algorithm for locating the home directory
Refactor the algorithm for locating the home directory

This commit hopefully fixes a Windows bug with find_home() where '..'
elements were indefinitely added to the test path until the application
crashed with a 'path too long' error.

dmulholland/ivy