Added support again for optimize and progressive PIL save options.
Used http://stackoverflow.com/questions/6788398/how-to-save-progressive-jpeg-using-python-pil-1-1-7
as guide on how to deal with IOError