Switch it to file.exists? and File.directory? so 1.8.7 doesn't complain.