Fixed sneaky segfault, removed debug statement, and added a threshold value
to the image comparison function, tiles lower down were not being recognised
due to small differences. Unknown cause

Signed-off-by: Daniel Mansfield <daniel.mansfield99@gmail.com>