Chef 4934

for fix CHEF-4934, I replace the configfile writing code with file resource.