Use Pathname#to_s instead of Pathname#to_path

Fixes #1723.
Merge pull request #1730 from mojombo/pathname-to-s

Use Pathname#to_s instead of Pathname#to_path