opscode/chef — pull request #809 by sempervictus (2013-06-09 04:00:54+00:00)
Title: Check to ensure tempfile exists before :close!

Quick fix for people experiencing 3952 and probably other things.
Initially appeared to be a problem with how we resolve binary
content, but even an improved method resulted in tempfile being
nil.

It may also be worth addressing the binary_contents? method.