Fix Pathname.each_filename on Ruby 1.8.7