Fix regexizePath so it escape '.' character

Fix failing unit test in #255 and fix the real bug introduced.