Correct current path regexp check.