Hi David,
It sounds very curious that -mindex 1 1 didn't work and that you only got 40 rows. I would check using 3dinfo both "roi_mask+orig" and "realigned_&_filtered_functionals+orig" to make sure they have the appropriate number of sub-briks (145 for realigned_&_filtered_functionals+orig) and value ranges (O-1 for roi_mask+orig). Other than a problem with the input, I'm stumped without more information.
3dmaskave averages all the voxels within a mask from the specified dataset.
Here are a few suggestions.
Remove
-quiet to get some extra information from the output (# voxels in cluster)
Remove
> timeseries.txt to have output to screen instead.
good luck,
-jim