Minor cleanup to shr. mem. win error checks

A few small changes to tighten up the error checks in the interprocess mutex
code.