mkdtemp
check error in mkdtemp()
Merge pull request #1872 from coolwanglu/mkdtemp

mkdtemp