Config generation moved to a class to improve modularity.
New method write() creates one file for every resource type.

Added option --base-dir. write() creates files inside $base_dir/tmp.d/
Fix: reload functionality had been accidentally removed.