Match directory path to namespace path