Do not try to source stray directories in bashrc paths

Check whether a particular bashrc path is not a directory before trying
to source it. Avoids unnecessary 'is a directory' errors.
Restore sbindir install support

Restore the ability to install sbin-tools into sbindir since it works
fine with pure distutils. The issue is python-exec/eclass-specific and
therefore all the relevant workarounds belong in the ebuild.
portage.os.waitpid: handle EINTR for bug #525552

Use a new _eintr_func_wrapper class to wrap waitpid calls and handle
EINTR by calling the function as many times as necessary (until it
returns without raising EINTR).

X-Gentoo-Bug: 525552
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=525552
Acked-by: Alexander Berntsen <bernalex@gentoo.org>