Fixes processing/processing#1810 where a png data would be written instead of jpeg data.

See issue #1810

The file being saved (although it has the jpg extension) was a actually a PNG:

![screen shot 2013-05-26 at 14 08 01](https://f.cloud.github.com/assets/385154/565276/f7fe0008-c5fc-11e2-9ff2-b0102301cece.png)