Update compare-images.pl

fixed chomp calls