tarball: properly normalize perms for all extracted files
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
readable).
This adds a test that all possible file permissions properly normalize
to either 0o100644 or 0o100755.