Close the file in the libpng error handler.