Resolve #84 by adding support for 'write option mask ...' including unit tests.