Improve config options

Improve config handeling by nor overwriting the path or the config dict itself.

Also adds basic support for variable injection. (Mostly useful as API for other plugins)

Finally add more documentation for all this.