PDF: Improvements for special files

If the output file is not a regular file, use a temporary file to generate the PDF, then copy the
result to the specified output file.  On Windows, this also happens if the output is stdout.

This is intended to allow output to a pipe or socket.   Although checkpointing will work, it isn't
very useful since  the temporary file ought to disappear.

If a temporary file is used, APPEND will never happen; the effect is NEW or REPLACE.

Finally, parity with the Perl prototype...