Fixed test bug
Fixed check for mask dimensions when original image did not exist