title: OSError: [Errno 22] Invalid argument: Upon Folder Path
body: <p>Trying to save a downloaded image to a path (inside a folder). It works with no folder, and I have tried relative and absolute paths.</p>
  
  <pre><code>import requests
  import os
  import progressbar
  
  b_url = "http://cdn2-img.pressreader.com/pressdisplay/docserver/getimage.aspx?file=9b342017090100000000001001&amp;page={}&amp;scale=100"
  
  print("Format your url like this:")
  print(b_url)
  print("Note the {}\n")
  print("Images will be written to the directory `PressReader`")
  url = input("URL: ")
  if url == "":
    url = b_url
  name = input("Article name: ")
  page_length = 84
  bar = progressbar.ProgressBar()
  for page in bar(range(0, page_length+1)):
    if not os.path.exists("PressReader"):
      os.makedirs("PressReader")
    r = requests.get(url.format(page), stream=True)
    if r.status_code == 200:
  with open(r'"PressReader\{}-Page-{}.png"'.format(name, page), 'wb') as f:
    for chunk in r:
      f.write(chunk)
  </code></pre>
  
  <p>This should make a folder <code>PressReader</code> (which it does), then download the images to that folder.</p>
  
  <p>It however breaks, with this error:</p>
  
  <pre><code>line 23, in &lt;module&gt;
  with open(r'"PressReader\{}-Page-{}.png"'.format(name, page), 'wb') as f:
  OSError: [Errno 22] Invalid argument: '"PressReader\\e-Page-1.png"'
  </code></pre>