Store references as pngs and write failures to separate png files.
Merge pull request #2935 from brendandahl/png-refs2

Store references as pngs and write failures to separate png files.