Fix creation of directopries