backend_ps: Do not write to a temporary file unless using an external distiller.

If ps.usedistiller is omitted, writes directly to the output file, instead of
creating a temporary file and subsequently copying it to the output.

This is more efficient, and also works on restricted platforms such as Google
App Engine, which are unable to provide a writable temporary file system.
Merge pull request #1826 from mgiuca-google/backend_ps-no-temp-file

backend_ps: Do not write to a temporary file unless using an external distiller