Fix generation of toc source files at top level directories.