more inteligently find home directory