@CNovakCAA what do you think about `return dirname.substring(1).replace(new RegExp(pathSep, 'g'), '.');` instead?