Correct RedHad alternatives and profile.d handling

FIXES: Manipulating symlinks directly on RedHad hosts without using
alternatives leaves the host in an inconsistent state.  In addition,
JAVA_HOME was not being set for sh shells.