Ruby 2.1.x compatibility

This is a fix for issue #22. 

It includes the two commits from @Spooner 's #23 pull request (keeping his original commits to give credit where credit is due) plus an additional commit to fix the remaining problem.

I have tested this with Ruby 2.0.0-p247, 2.1.0 and 2.1.2.

Merging this would also allow to close #23 and #24 which would now be redundant.

I have updated the CHANGELOG and version number but I didn't rebuild the gem. I am not sure if I had to do this or how to update the gem so RubyGems is aware of this new version. If I am given instructions I can do this as well or leave this to the texplay maintainers.

Thanks,
I remain available for any further work needed on this pull request.