ManifestDirWalker: Teach 'mode' attribute

Rewrite the attribute getters to use os.stat(), and use that to return
the mode/permission bits.

Adjust tests accordingly.
ManifestDirWalker: Add support for 'uid' and 'gid' attributes
ManifestTarWalker: Add support for 'mode' attribute
ManifestTarWalker: Add support for 'uid' and 'gid' attributes
Add tests and fix for invalid size/sha1 attributes
ManifestFileParser: Add parsing of mode/uid/gid attributes
Move ManifestFileWriter tests into its own module
ManifestFileWriter: Add formatting of mode/uid/gid attributes