Only run sudo if not already running as root.  Allows jenkins builds to
work.