Fixed making directory mode error.