better HOME_DIR lookup