Adds support for Ruby 1.8

Sadly, IO.popen does not support multiple arguments on ruby 1.8. That means we have to build the entire command by merging all parts together; I hope escaped_command is good enough for this :(