Add ability to run configurable "preupdate" and "postupdate" shell scripts during image file writing.

Preupdate runs before replacing the .png, postupdate runs after. Both wait for completion before continuing, so scripts should be fast, or fork into the background themselves if appropriate. The image file name is provided as an argument.

Expected use-cases:
-Run optipng or similar in preupdate
-Upload to webserver or flush caches in postupdate

I'm sure there are others too. :)