Check for matching in-memory sniffer before appending. Remove sniffer when deactivating or uninstalling a repository. Additional checks for keys existing before deleting them.
Merge fix from next-stable.
Correctly handle extracting a tarball that does contain all files and directories within a single directory at the root of the archive, but does not contain an entry for the directory itself.
Merge fix from next-stable.