Fix test to Ruby 1.8

Pathname doesn't respond to to_path