Update compare-images.pl

fixed bug line 11