You
can use 3dcalc on the command line to create a temporary dataset, as in
3dmaskave -mask '3dcalc( -a m1+orig -b m2+orig -expr 'm1*m2' -nscale )' ...
The temporary dataset thus created will be deleted after it is used. This will at least save your script from having to delete it itself.
bob cox