Check for ValueError on write to read-only Dats.

Recent versions of numpy throw a ValueError rather than a
RuntimeError when trying to write to a read-only array.

Buildbot pass: http://buildbot-ocean.ese.ic.ac.uk:8080/builders/pyop2-testing/builds/126