Use File.exists? instead of Dir.exists? in recipe add code for ruby-1.8 compatibility