Nicer config file handling. Fixes #103. Fixes #102.