Make signature of Pathname#write compatible with Ruby 2.1+