publish: Generate correct archive paths

When using tar, the archive header was generate incorrectly, which
resulted in unpacking generating a wrong directory structure.