Drop privileges before reading the configuration

Change the uid/gid before reading the configuration.
This makes the ~/ path expansion use the specified users home directory.