Fix screenshot code to work with ImageMagick 6.8.6. The compare command output no longer ends with a newline. Preserves compatibility with older versions.