title: How do I create a subdirectory if no one exists when writing to a CSV file?
body: <p>I am creating a CSV file like this:</p>
  
  <pre><code>    CSV.open("#{city}.csv", "a+") do |csv|
        csv &lt;&lt; listing
      end
  </code></pre>
  
  <p>But, ideally I would like to do <code>results/#{city}.csv</code>, if that file doesn't exist. </p>
  
  <p>What's the best way to approach this?</p>