Split the saving of tree state from the saving of the project path.

Those are two independent things that need to happen at different times.
Merge pull request #9224 from adobe/dangoor/9212-followup

Split the saving of tree state from the saving of the project path.