title: yaml.dump adding unwanted newlines in multiline strings
body: <p>I have a multiline string:</p>
  
  <pre><code>&gt;&gt;&gt; import credstash
  &gt;&gt;&gt; d = credstash.getSecret('alex_test_key', region='ap-southeast-2')
  </code></pre>
  
  <p>To see the raw data (first 162 characters):</p>
  
  <pre><code>&gt;&gt;&gt; credstash.getSecret('alex_test_key', region='ap-southeast-2')[0:162]
  u'-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEA6oySC+8/N9VNpk0gJS7Gk8vn9sYN7FhjpAQnoHRqTN/Oaiyx\nxk2AleP2vXpojA/DHldT1JO+o3j56AHD+yfNFFeYvgWKDY35g49HsZZhbyCEAB45\n'
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>&gt;&gt;&gt; print d[0:162]                                                                                                                                                                                          
  -----BEGIN RSA PRIVATE KEY-----
  MIIEogIBAAKCAQEA6oySC+8/N9VNpk0gJS7Gk8vn9sYN7FhjpAQnoHRqTN/Oaiyx
  xk2AleP2vXpojA/DHldT1JO+o3j56AHD+yfNFFeYvgWKDY35g49HsZZhbyCEAB45
  </code></pre>
  
  <p>I write to a YAML file:</p>
  
  <pre><code>&gt;&gt;&gt; import yaml
  &gt;&gt;&gt; with open('foo.yaml', 'w') as f:                                                                                                                                                                        
  ...     yaml.dump(d, f, default_flow_style=False, explicit_start=True)
  ... 
  </code></pre>
  
  <p>Now it looks like this:</p>
  
  <pre><code>$ head -5 foo.yaml 
  --- !!python/unicode '-----BEGIN RSA PRIVATE KEY-----
  
    MIIEogIBAAKCAQEA6oySC+8/N9VNpk0gJS7Gk8vn9sYN7FhjpAQnoHRqTN/Oaiyx
  
    xk2AleP2vXpojA/DHldT1JO+o3j56AHD+yfNFFeYvgWKDY35g49HsZZhbyCEAB45
  </code></pre>
  
  <p>i.e. each line has two newlines.</p>
  
  <p>Now if I read it back into a string I see that all is okay in the round-trip:</p>
  
  <pre><code>&gt;&gt;&gt; with open('foo.yaml', 'r') as f:
  ...     d = yaml.load(f)
  ... 
  &gt;&gt;&gt; print d[0:162]
  -----BEGIN RSA PRIVATE KEY-----
  MIIEogIBAAKCAQEA6oySC+8/N9VNpk0gJS7Gk8vn9sYN7FhjpAQnoHRqTN/Oaiyx
  xk2AleP2vXpojA/DHldT1JO+o3j56AHD+yfNFFeYvgWKDY35g49HsZZhbyCEAB45
  </code></pre>
  
  <p>(I don't understand why however.)</p>
  
  <p>My real problem is that if humans read this YAML file they will probably assume, as I did, that my program has broken the formatting of the private key file.</p>
  
  <p>Is there a way to use yaml.dump so as to output something without the additional newline characters?</p>