title: Ruby: check if directory exists
body: <p>How can I check if a directory exists in Ruby?
  I tried with this but it didn't want to work.</p>
  
  <pre><code>rescue Errno::ENOENT
  puts "Directory does not exist"
  </code></pre>