Fix creating directories