added a more robust detection of portdir, etc, for hashed dirs (if
'/etc/gentoo-release' is found).