Use the prepared .packageusergroup file to lookup user and group names
when processing the passed file mode.
Also replace the various subshell/cut invocations with a sequence of
standard variable interpolations which fixes paths with embedded colons
as a side-effect.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>