Added some parameters to check if the script is executed directly.

Also fixed an issue with the require rest client gem. This was just
to get the script to run.
Merge pull request #1 from thegillis/feature-run-script

Added the ability to run the script directly