You could copy the original files onto a directory you have write access to.
If that is not possible, you should consider putting the new branches in a new TTree in a new file and when using/reading the TTree, open both the original and new files and make the new TTree a friend of the old TTree.
Cheers,
Philippe.
PS.
With newer version (v6.14 and newer) of ROOT we recommend replacing
avgBranch->Fill();
with
avgBranch->BackFill();
to allow for better alignment of the new branches with the “clusters” of the existing TTree.