Pathname doesn't have to_path in 1.8

This should fix the jruby-1_7 build. Or at least partially fix it.

See https://github.com/jruby/jruby/issues/1460