Update compare-images.pl

fixed syntax - chomp, split