posix: quick and dirty implementation of mkdtemp