Rewrite code for renaming PNG files

Now uses metadata found in the EXIF header and does not
rely on the form of the input file name at all.