filehandling: added function for writing dictionaries to config files

Signed-off-by: LK <LK@uni>