fixing nameclashes between documents and directories (in a crude way, refactoring DocumentModule/node.tree would be ideal