Avoid raising an exception if a tempfile could not opened

This causes an unnecessary crash; the semantics of this procedure
suggest it should swallow exceptions, not create them.
Merge remote-tracking branch 'fdr/master'
rever tto 4b99b4fa41487489f04d52bec20235e28dfbbfda