There is a "3ddot -dodice" command in your proc script now, that gets the coefficient between the EPI and anat masks. So this one would compute it between the anat and group (template) masks, as in:
3ddot -dodice mask_anat.$subj+tlrc mask_group+tlrc \
|& tee out.mask_at_dice.txt
That is what the command will look like in an updated script. The "at" is short for anat/template.