fixes #7627 - handle cases where this codte is ran outside of rails

When running katello ruby code outside of rails the Rails.root
is incorrectly set (katello-disconnected)
Merge pull request #4692 from jlsherrill/KATELLO-2.0

fixes #7627 - handle cases where this codte is ran outside of rails