this is not directly based on any existing mktemp implementation, but
accepts the most common options. -u and -p are not accepted but could
be trivially implemented.
slight behavior difference: for -t, all files passed will be rooted
within the tmp directory, not just the first. this differs from apple
and netbsd behavior at least (and i believe gnu as well), but makes
more sense.