Adapt unit tests for new directory layout.
Fix handling of root directory.