Write trees at end of each bootstrap processing

Bootstrapping jobs, for one reason or another, sometimes unexpectedly stop. If it does, all the trees generated so far are lost.  The proposed change writes trees at the end of processing of each bootstrap replicate so that these can be recovered in case a job unexpectedly stops.