XD-1881 followup

Tested with and without XD_HOME set
When set, tested with
* relative path
* absolute path

* path ending with a '/'
* path not ending with a '/'


Tested on
* Mac
* Windows

(phew)