Fix handling of root directory.