Non root directory config

Fix and test cases in relation to https://github.com/bolt/bolt/issues/1223