fix links in folders, sort files by path