Exclude files and directories matching the given patterns while creating an archive, using libarchive's matcher for parity with file(ARCHIVE_EXTRACT). Fixes: #27877.