archival: added O_TRUNC so that when we overwrite files on unpack,
          we truncate them. Also spotted & fixed hard to trigger bug
          with extension handling.

5 files changed