fix 5705 - Cleanup for Peter's belated drive by comments

fix #5705:  Image closed and no editor opened after if cancel quitting or closing project

Also fixes handleFileClose(imageFilePath) with the image file path.