check return code from h5repack before overwriting old file; fixes #18