added the code to make the gem executable, but have not tested yet
works as a standalone gem with awesome error handling