As I mentioned in #113 please amend this commit to use the block style.  Also, is it intentional that this patch doesn't unlink the tempfile?  If not, please use the begin ... ensure ... end style with an explicit unlink and close in the ensure block.

```ruby
Tempfile.open("validate_cmd") do |tmpfile|
  tmpfile.write(content)
end
```

This will ensure the file is always closed, even if there's exceptional behavior after opening the file.

And with unlink:

```ruby
file = Tempfile.new('foo')
begin
   ...do something with file...
ensure
   file.close
   file.unlink   # deletes the temp file
end
```

See: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/tempfile/rdoc/Tempfile.html