Made it a gem and fixed some things
Merge pull request #1 from Aaronneyer/master

Bug Fix and packaged as a gem