Fixed more issues with directory parsing.