added chmod for dirs