Fix screenshot code to work with the latest version of ImageMagick

With ImageMagick 6.8.6 all screenshot compares fail because the compare command output no longer ends with a newline. I chomp the newline off, so we preserve compatibility with older ImageMagick versions.