Made version detection prefer STDOUT.

My shot at fixing issue #4.
Tried it on jruby 1.7.2 ((1.9.3p327) 2013-01-04 302c706 on OpenJDK 64-Bit Server VM 1.7.0_40-b31 +indy [linux-amd64]), it looked like Open3.popen3 worked there.