Check if required gem is installed, and install if not already installed

If the required gem is not installed it'll prompt the user if they want to install it.

It often needs root permissions to run the `gem install`, so if the normal `gem install` fails it will try again with `sudo`.