Added patching routine and code to save file.
Have run first debugs on a single file.  Still need to debug patching routines with more than one file.