fix test image compare utility to avoid double write
create images if they do not already exist
more fixes after #38