Major change in write operation:
  a temp version is created immediately upon open;
  write_version/truncate_version interfaces are simplified;
  fix previous problem with copying large files.