plotly/python-api — pull request #161 by nattress (2014-11-29 21:17:34+00:00)
Title: Fix duplicate file name extension

If a filename extension and a format are specified with the same string,
we create a file with a double file extension. Ie:

```javascript
py.image.save_as(figure, 'filename2.png', 'png')
```
This will produce a file named filename2.png.png. When ext and format
are both present, the fix will only append format to the filename if the
format is different from ext. Ie:
```javascript
py.image.save_as(figure, 'filename2.png', 'pdf')
```
This will create filename2.png.pdf.