lib: fix handling of one character long directory names at top level