Properly close the archives before freeing them
Drop support for libarchive older than 2.8.4