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 #4690 from mccun934/20140929-0549

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