normalize dir structure