Fix problems with supervisor

* Fixed multiple bugs in supervisor and few improvements added
* In root config when accessing uci root_dir is now used