Update compare-images.pl

Moved exists up.