Sort argument hash for Ruby 1.8.7

Unordered hashes in Ruby <1.9 cause the tests to fail because the arguments
are rendered in the wrong order. Prevent this from happening by sorting the
argument keys before iterating on them. Gor doesn't care about the order of
arguments.