fix major bug created from copying mkdtemp logic
fix major bug created from copying mkdtemp logic

rofl0r/musl-old,chneukirchen/musl-chris2,chardi/musl,davidlazar/musl,rofl0r/musl-old,davidlazar/musl,chardi/musl,chneukirchen/musl-chris2,chardi/musl