Automatically make xmp sidecar if necessary.

If the image format doesn't support metadata (e.g. GIF) or if the file
cannot be written for some other reason an xmp sidecar file is created
to store the metadata.