title: Can't update a gist immediately after creating it
body: <p>I am trying to use the gist API as a adhoc diff tool. To do this I want to upload some text to a gist and then update it and view the diff. For some reason I am getting 
  <code>"{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3\"}"</code> as a result. Its slightly confusing as when I view the url I can see the GIST fine. </p>
  
  <p>My code is as follows </p>
  
  <pre><code>uri = URI("https://api.github.com/gists")
  
  first_payload = {
      'description' =&gt; "My test gist",
      'public' =&gt; true,
      'files' =&gt; {
          'change.yml' =&gt; {
              'content' =&gt; "before"
          }
      }
  }
  
  req = Net::HTTP::Post.new(uri.path)
  req.body = first_payload.to_json
  req.basic_auth("username", "password")
  res = Net::HTTP.start(uri.hostname, uri.port, :use_ssl =&gt; true) do |http|
    http.request(req)
  end
  
  second_uri = URI(JSON.parse(res.body)["url"])
  second_payload = {
      'description' =&gt; "My test gist",
      'public' =&gt; true,
      'files' =&gt; {
          'change.yml' =&gt; {
              'content' =&gt; ':after'
          }
      }
  }
  
  second_req = Net::HTTP::Put.new(second_uri.path)
  second_req.body = second_payload.to_json
  second_req.basic_auth("username", "password")
  second_res = Net::HTTP.start(second_uri.hostname, second_uri.port, :use_ssl =&gt; true) do |http|
    http.request(second_req)
  end
  </code></pre>