It exist cases when an uncompressed tarball has directories without
any traversal or read permissions so ensure to also fix directory
permissions in normalize_permissions function.
I spotted that issue while testing the CPAN loader in docker.
It is also happening when attempting to load some PyPI and Maven packages.
(see Sentry issues below).
Fixes SWH-LOADER-CORE-1AZ and SWH-LOADER-CORE-ZW