Fix masked npy reference file creation.
Merge pull request #759 from rhattersley/fix-masked-npy-data

Fix masked npy reference file creation.