Improve working dir determination process, add possibility to set a custom from the interface