Fixed converting Path to RegEx.