Merge pull request #1 from jpluimers/master

A few fixes for your excellent ruby script.