ncm-named: fix retrieval of named root directory from sysconfig

Fixes #241

Wait for more unit tests to be added before merging this PR.
ok, it's not. multiple lines with `ROOTDIR`, last one should win as is the case with loop below. don't know how to select last match with a oneliner ...