Open existing destinations for writing before choosing the output path.
Write FIFOs and devices through their handles; reject targets whose write
permissions deny access. Keep regular-file replacement atomic and retain
the existing curl-compatible mode and umask handling.
Cover FIFO delivery, device symlinks, read-only targets and preserving the
original regular-file contents when temporary-file creation fails.