Fix read-write functionality in compressed image formats

GZ image handler wrapper was not having the header contents filled with data on image load. Therefore, if the image was opened read-write, the re-written header would contain uninitialized data.