Also, if you really want to join 2 or more masks into 1 mask (so that you can use a fill effect, for example), and if you have Illustrator installed, you can do this:
1. highlight and copy all of the masks you want to join
2. paste them in to a blank illustrator document
3. use the “direct selection” tool to select the end point of one mask, hold down shift, then select the end point of the other mask
go to Object > Path > Join (or command-J)
4. repeat step #3 as necessary until you have only 1 path
5. copy the path
6. paste the path into an After Effects layer. you may need to move the entire path around to line it back up where it belongs.
some extra tips for working with masks in AE:
double-click on a mask point to select the entire mask, so that you can move it around without moving the layer it’s applied to. you can also scale the mask by dragging its bounding box (and shift-drag to constrain proportions)
to help line up 2 masks, temporarily apply a stroke effect to both, using contrasting colors, so that you can clearly see both at the same time.