Add standard checks for root/gpgkeys

When yum replace is run as a non-privileged user, it doesn't complain, and attempts to do the install/remove.

Sometimes this doesn't even result in an error and leaves the user confused as to why their package is still the old one.

These checks stop that happening, along with additionally doing some other sanity checks that yum install/update also does.