use mkdir(2) instead of mkdir shell command