Reimplement edit_file using Chef::DelayedEvaluator