Fixed THUMBNAIL_PRESERVE_FORMAT setting usage.

.setdefault doesn't work for existing key