adding consistency for directory matching with non-word characters