Fix directory splitting, make it work on other platforms
Warning
Refactor toc-nav a bit