Merged from trunk 585{1,9}
Don't use os.path.isdir() because it can swallow errors related to
filesystem/disk corruption.
add some new tests (WarnerBro)
rename file (WarnerBro)
Round one of dep_getusedeps() (WarnerBro)
increase test coverage to cover slots, uncovering a few corner cases
that need fixing (WarnerBro)
fix regression in test changes (WarnerBro)
Load the most current variables from /etc/profile.env for post_emerge
stuff.
Fix --newuse so that it works correctly with --usepkg.
svn path=/main/branches/prefix/; revision=5861