mount: Fix writing chunks with more than 10 copies

This commit fixes a bug in mfsmount which caused it to update only 10 of
all chunk copies when writing a file. This resulted in inconsistent
chunks being created when using goals which require more than 10 copies.

A test which detects such bugs is also attached to this commit.

Change-Id: If3cc22f6d74374ad5e6e8cff153d54073bc88ffe