Fixes for compression corruption

Turns out that the fix for my corruption problems is fairly simple - if the compressed data can't fit into an output buffer the same size as the original data, then the exr convention is to use the original data instead.

I haven't actually compiled this in this exact form, since our local copy of microexr has gotten a bit mangled for namespace reasons, and my only unit tests are part of a more complicated framework, but it definitely fixes the problem in the situations I've tested in.  ( It's better than returning a zero length buffer anyway, which was resulting in writing random data into the image. )