title: Read from url and write to Tempfile
body: <p>Say I have this url: <a href="http://s3.amazonaws.com/estock/fspid10/27/40/27/6/buddhism-hindu-religion-2740276-o.png" rel="noreferrer">Image</a></p>
  
  <p>And I want to write its contents to a tempfile. I am doing it like this:</p>
  
  <pre><code>url =  http://s3.amazonaws.com/estock/fspid10/27/40/27/6/buddhism-hindu-religion-2740276-o.png
  tmp_file = Tempfile.new(['chunky_image', '.png'])
  tmp_file.binmode
  
  open(url) do |url_file|
    tmp_file.write(url_file.read)
  end
  </code></pre>
  
  <p>But it seems tmp_file is empty. Beacuse when I do:</p>
  
  <pre><code>tmp_file.read =&gt; # ""
  </code></pre>
  
  <p>What am I missing?</p>