title: Can't save PIL image in python
body: <p>I'm trying to run code from here <a href="https://github.com/pytorch/examples/tree/master/fast_neural_style" rel="nofollow noreferrer">https://github.com/pytorch/examples/tree/master/fast_neural_style</a>, I run the following command from the terminal <code>python neural_style/neural_style.py eval --content-image ./images/content-images/amber.jpg --model ./saved_models/mosaic.pth --output-image a.jpg --cuda 0</code>, where <code>a.jpg</code> is output image, but every time I get an error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "neural_style/neural_style.py", line 240, in &lt;module&gt;
      main()
    File "neural_style/neural_style.py", line 236, in main
      stylize(args)
    File "neural_style/neural_style.py", line 150, in stylize
      utils.save_image(args.output_image, output[0])
    File "C:\Users\Lenovo\Documents\fast_neural_style\neural_style\utils.py", line 19, in save_image
      img.save(filename)
    File "C:\Users\Lenovo\Anaconda3\lib\site-packages\PIL\Image.py", line 1991, in save
      fp = builtins.open(filename, "w+b")
  FileNotFoundError: [Errno 2] No such file or directory: 'a.jpg'
  </code></pre>
  
  <p>I tried to prescribe before <code>a.jpg</code> full path with slashes and backslashes, but every time this error still appears.</p>
  
  <p>I launched the following script with a command <code>python test.py</code> from the terminal:</p>
  
  <pre><code>from PIL import Image, ImageDraw
  text = "test image"
  color = (0, 0, 120)
  img = Image.new('RGB', (100, 50), color)
  imgDrawer = ImageDraw.Draw(img)
  imgDrawer.text((10, 20), text)
  img.save("pil-example.png")
  </code></pre>
  
  <p>There was again an error</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 7, in &lt;module&gt;
      img.save("pil-example.png")
    File "C:\Users\Lenovo\Anaconda3\lib\site-packages\PIL\Image.py", line 1966, in save
      fp = builtins.open(filename, "w+b")
  FileNotFoundError: [Errno 2] No such file or directory: 'pil-example.png'
  </code></pre>
  
  <p>But when I launched this script in a <code>jupiter-notebook</code>, it worked without errors.</p>
  
  <p>I use: Windows 10, Python 3.7.1, Pillow 5.3.0.</p>
  
  <p>I would be grateful for any advice in solving this problem!</p>