Bug 1054326: Initial attempt to submit Imagecompare test framework and test cases int...

...o the main branch
We call this in two places, but as we always need to know the reference path we should just use it once and avoid creating the method.