Use inner functions to reduce code re-use in Indexer.save_on_disk()

The inner functions were less general than I might otherwise right, since they were both used for a specific purpose for a specific function. Seemed pointless to have extra parameters. Can easily be changed (especially with its limited scope) if the need arises.  Couldn't think of a way to iterate through member variables to assign stuff to them.