fix for src/test/Trac496.rb

Pathname responds in Ruby 1.9 only to :to_s