extract PATH extra slashes cleaning to separate function, update #1446
spped up alias lookup time, update #1446