The previous implementation would not normalize permissions for
files detected as executable. This would make the loader crash when a
file has bogus permissions such as 0o100100 (executable but not
This adds a test that all possible file permissions properly normalize
to either 0o100644 or 0o100755.
Addresses sentry issue: https://sentry.softwareheritage.org/share/issue/062198271b4d40feab41330f12ec4dc2/
(yes, I've seen T3244, but this looked like a low enough hanging fruit...)