Fix saving image dimension file sizes.

This has been broken for YEARS. I noticed it over the file sizes were not saving over a year ago, and did a bunch of debug and traced it back to Imagick not returning a file length or size after the Imagick is cloned. I reported a bug then (https://bugs.php.net/bug.php?id=64015) which pointed the finger at upstream Imagick behaviour. This works around the fact that cloned Imagick instances cannot get filesize by saving a temporary file, loading it again with a new instance, and grabbing the filesize from that.
Can you explain better why it needs to duplicated? I'm confused why it's necessary.