Simplify parsing of configuration file

I used standard glibc calls to parse the configuration file since it has the same syntax as the passwd file. This reduces the surface area for errors and reuses well tested code.