Thanks for the update but you forgot the check for Ruby 2.0 (as used in Mavericks). Otherwise using umlauts (äöü) will throw an error. (As we talked about on Twitter)
Adding the two lines
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
at the top of the script solved the problem for me.