Test partial write.

Test that appending to a file will correctly handle the case where only
part of the buffer is successfully written in the call to `fs.write`.

Closes #68.