replaced method coerce_to with coerce_to_path within Dir.rb method: self.chdir"