This is a variant of mkostemps() which takes a directory descriptor and
returns a descriptor for a file relative to that directory. This allows
easier capsicumization of some applications.
My particular use-case is strip(1), which processes each of its input
files, storing the result in a tempfile, and renames each tempfile back
over the corresponding input file.