Same here. Tried both those examples. What happens is that the Mask is not rendered at all and the MaskedDiffuse is rendered just like a normal Diffuse. This is Unity 3.0.0f5 (51258) for the mac. Free version! No errors or warnings appear (also not inside the shader files).
Edit 2: ok solved it partially…
The mask shader simply says “Colormask 0”
The masked shaders say “Tags {Queue = Overlay}”
I think it went wrong with the UsePass stuff, but I don’t know much about shaders yet.
I attached my working example. It doesn’t apply to a terrain yet and, more importantly, the mask doesn’t allow light to pass through.