Lazily build uid/gid from user/group

This allows generating the init script even if the users don't exist (e.g. on a build host).