Parser nests directories incorrectly