docs: def openMaskFile(filename):
      """
      Open the bitmask file sitting next to a file in the filesystem.
      """
      dirname, basename = os.path.split(filename)
      newbasename = '_%s_.sbm' % (basename,)
      maskfname = os.path.join(dirname, newbasename)
      maskfile = openReadWrite(maskfname)
      return maskfile