pngminus: Delete the incomplete output files upon premature termination

Defer the program termination on error until all files are closed and
(if applicable) all incompletely-written output files are deleted.

In addition, perform the following maintenance tasks:
 * Rename and document the internal helpers used by the functions
   `png2pnm` and `pnm2png`.
 * Unset the executable permission bits for the *.bat test programs.
5 files changed