rsmask2: added a small masking utility that applies a mask to a nifty