Correcting directory syntax errors