Implement enhancement outlined in issue #136

1. write_partial() increments version numbers if metadata is new or the first to be written.
2. write() increments version numbers if partial metadata is not loaded and a partial_write() is not needed.