Transform code to use 'pathname', which is in stdlib since Ruby 1.9.3

Transform code to use 'pathname', which is in stdlib since Ruby 1.9.3

-> http://www.ruby-doc.org/stdlib-1.9.3/libdoc/pathname/rdoc/Pathname.html