add semi-functional tests
add semi-functional tests

- don't mock Tempfile, and check its file mode

sekrett/chef,oclaussen/chef,EasonYi/chef,kaznishi/chef,danielsdeleo/seth,bahamas10/chef,AndyBoucher/Chef-Testing,smurawski/chef,smurawski/chef,baberthal/chef,ckaushik/chef,brettcave/chef,jordane/chef,EasonYi/chef,nalingarg2/chef-1,Ppjet6/chef,joemiller/chef,onlyhavecans/chef,zshuo/chef,tas50/chef-1,mio-g/chef,higanworks/chef,MsysTechnologiesllc/chef,permyakovsv/chef,jmhardison/chef,zshuo/chef,andrewpsp/chef,ekometti/chef,b002368/chef-repo,ccsplit/chef,joemiller/chef,juliandunn/chef,AndyBoucher/Chef-Testing,sekrett/chef,youngjl1/chef,jblaine/chef,MichaelPereira/chef,ktpan/chef-play,ccsplit/chef,ChaosCloud/chef,sanditiffin/chef,Igorshp/chef,custora/chef,clintoncwolfe/chef,nellshamrell/chef,askl56/chef,jaymzh/chef,cachamber/chef,webframp/chef,permyakovsv/chef,nguyen-tien-mulodo/chef,gsaslis/chef,karthikrev/chef,malisettirammurthy/chef,josb/chef,jk47/chef,jblaine/chef,nellshamrell/chef,jordane/chef,cachamber/chef,mio-g/chef,Tensibai/chef,jkerry/chef,b002368/chef-repo,askl56/chef,acaiafa/chef,mikefaille/chef,polamjag/chef,tbunnyman/chef,cgvarela/chef,zshuo/chef,custora/chef,joemiller/chef,mikefaille/chef,Tensibai/chef,tomdoherty/chef,youngjl1/chef,DeWaRs1206/chef,ccope/chef,higanworks/chef,jagdeesh109/chef,cgvarela/chef,ccsplit/chef,strangelittlemonkey/chef,ducthanh/chef,nathwill/chef,andrewpsp/chef,jblaine/chef,kaznishi/chef,tbunnyman/chef,strangelittlemonkey/chef,grubernaut/chef,sometimesfood/chef,legal90/chef,martinb3/chef,adamleff/chef,strangelittlemonkey/chef,chef/chef,MichaelPereira/chef,gsaslis/chef,evan2645/chef,malisettirammurthy/chef,nsdavidson/chef,onlyhavecans/chef,legal90/chef,EasonYi/chef,lamont-granquist/chef,nicklv/chef,antonifs/chef,patcon/chef,BackSlasher/chef,tbunnyman/chef,nguyen-tien-mulodo/chef,docwhat/chef,lamont-granquist/chef,brettcave/chef,josb/chef,BackSlasher/chef,robmul/chef,acaiafa/chef,nsdavidson/chef,adamleff/chef,paulmooring/chef,sanditiffin/chef,oclaussen/chef,Igorshp/chef,paulmooring/chef,zuazo-forks/chef,karthikrev/chef,aaron-lane/chef,mikefaille/chef,lamont-granquist/chef,MsysTechnologiesllc/chef,jordane/chef,ranjib/chef,sekrett/chef,karthikrev/chef,evan2645/chef,3dinfluence/chef,jaymzh/chef,antonifs/chef,danielsdeleo/seth,nalingarg2/chef-1,skmichaelson/chef,ccope/chef,tbriggs-curse/chef,Ppjet6/chef,mio-g/chef,Kast0rTr0y/chef,sempervictus/chef,webframp/chef,pburkholder/chef,ChaosCloud/chef,sekrett/chef,swalberg/chef,zuazo-forks/chef,nathwill/chef,tas50/chef-1,jblaine/chef,juliandunn/chef,zshuo/chef,docwhat/chef,paulmooring/chef,ekometti/chef,tbriggs-curse/chef,josb/chef,evan2645/chef,cgvarela/chef,polamjag/chef,jimmymccrory/chef,oclaussen/chef,acaiafa/chef,nguyen-tien-mulodo/chef,andrewpsp/chef,natewalck/chef,legal90/chef,Kast0rTr0y/chef,renanvicente/chef,bahamas10/chef,Igorshp/chef,paulmooring/chef,Igorshp/chef,docwhat/chef,juliandunn/chef,swalberg/chef,Ppjet6/chef,sempervictus/chef,nvwls/chef,jk47/chef,josb/chef,tbunnyman/chef,jimmymccrory/chef,jk47/chef,onlyhavecans/chef,jagdeesh109/chef,ranjib/chef,ktpan/chef-play,lamont-granquist/chef,nicklv/chef,jagdeesh109/chef,jmhardison/chef,skmichaelson/chef,Igorshp/chef,cachamber/chef,baberthal/chef,jonlives/chef,jmhardison/chef,pburkholder/chef,faspl/chef,mattray/chef,3dinfluence/chef,kaznishi/chef,MichaelPereira/chef,juliandunn/chef,DeWaRs1206/chef,jagdeesh109/chef,circleback/chef,ekometti/chef,polamjag/chef,h4ck3rm1k3/chef,gene1wood/chef,martinb3/chef,faspl/chef,faspl/chef,jonlives/chef,sanditiffin/chef,patcon/chef,tbriggs-curse/chef,OpSitters/chef,nalingarg2/chef-1,clintoncwolfe/chef,ducthanh/chef,ChaosCloud/chef,andrewpsp/chef,skmichaelson/chef,BackSlasher/chef,kaznishi/chef,nvwls/chef,jk47/chef,sekrett/chef,nathwill/chef,nicklv/chef,onlyhavecans/chef,robmul/chef,EasonYi/chef,OpSitters/chef,circleback/chef,Kast0rTr0y/chef,someara/chef,cmluciano/chef,jordane/chef,mal/chef,gene1wood/chef,b002368/chef-repo,evan2645/chef,mikedodge04/chef,Kast0rTr0y/chef,ktpan/chef-play,ranjib/chef,strangelittlemonkey/chef,someara/chef,tas50/chef-1,mikedodge04/chef,ducthanh/chef,criteo-forks/chef,MsysTechnologiesllc/chef,smurawski/chef,nellshamrell/chef,erkolson/chef,sempervictus/chef,jagdeesh109/chef,martinb3/chef,aaron-lane/chef,swalberg/chef,ranjib/chef,EasonYi/chef,martinisoft/chef,ranjib/chef,ccope/chef,robmul/chef,josb/chef,gsaslis/chef,polamjag/chef,nsdavidson/chef,askl56/chef,evan2645/chef,mwrock/chef,faspl/chef,robmul/chef,DeWaRs1206/chef,zuazo-forks/chef,jkerry/chef,sideci-sample/sideci-sample-chef,AndyBoucher/Chef-Testing,nathwill/chef,aaron-lane/chef,MsysTechnologiesllc/chef,webframp/chef,sysbot/chef,faspl/chef,swalberg/chef,webframp/chef,clintoncwolfe/chef,polamjag/chef,karthikrev/chef,jkerry/chef,grubernaut/chef,h4ck3rm1k3/chef,AndyBoucher/Chef-Testing,AndyBoucher/Chef-Testing,grubernaut/chef,mwrock/chef,mal/chef,mikedodge04/chef,jonlives/chef,mattray/chef,renanvicente/chef,joemiller/chef,oclaussen/chef,sideci-sample/sideci-sample-chef,DeWaRs1206/chef,mattray/chef,nsdavidson/chef,mikefaille/chef,nsdavidson/chef,criteo-forks/chef,circleback/chef,MichaelPereira/chef,3dinfluence/chef,cachamber/chef,skmichaelson/chef,criteo-forks/chef,juliandunn/chef,DeWaRs1206/chef,jkerry/chef,ekometti/chef,paulmooring/chef,smurawski/chef,cgvarela/chef,ktpan/chef-play,cgvarela/chef,martinb3/chef,zshuo/chef,skmichaelson/chef,smurawski/chef,natewalck/chef,mio-g/chef,brettcave/chef,strangelittlemonkey/chef,tomdoherty/chef,faspl/chef,nvwls/chef,adamleff/chef,zuazo-forks/chef,Tensibai/chef,mal/chef,custora/chef,Ppjet6/chef,sometimesfood/chef,andrewpsp/chef,higanworks/chef,joemiller/chef,antonifs/chef,b002368/chef-repo,jimmymccrory/chef,ccsplit/chef,jonlives/chef,mattray/chef,jonlives/chef,acaiafa/chef,sempervictus/chef,baberthal/chef,MichaelPereira/chef,antonifs/chef,jk47/chef,mio-g/chef,askl56/chef,tbunnyman/chef,renanvicente/chef,natewalck/chef,ccope/chef,Kast0rTr0y/chef,docwhat/chef,danielsdeleo/seth,joemiller/chef,criteo-forks/chef,sanditiffin/chef,AndyBoucher/Chef-Testing,renanvicente/chef,erkolson/chef,jmhardison/chef,baberthal/chef,pburkholder/chef,custora/chef,sideci-sample/sideci-sample-chef,higanworks/chef,josb/chef,ChaosCloud/chef,oclaussen/chef,clintoncwolfe/chef,docwhat/chef,sysbot/chef,b002368/chef-repo,pburkholder/chef,clintoncwolfe/chef,mal/chef,malisettirammurthy/chef,nicklv/chef,malisettirammurthy/chef,mikefaille/chef,natewalck/chef,jblaine/chef,baberthal/chef,sanditiffin/chef,mwrock/chef,brettcave/chef,adamleff/chef,3dinfluence/chef,martinisoft/chef,zuazo-forks/chef,jmhardison/chef,nguyen-tien-mulodo/chef,nalingarg2/chef-1,natewalck/chef,martinb3/chef,patcon/chef,h4ck3rm1k3/chef,sempervictus/chef,jmhardison/chef,pburkholder/chef,someara/chef,karthikrev/chef,kaznishi/chef,zshuo/chef,swalberg/chef,circleback/chef,brettcave/chef,danielsdeleo/seth,OpSitters/chef,jonlives/chef,docwhat/chef,youngjl1/chef,sysbot/chef,polamjag/chef,BackSlasher/chef,webframp/chef,tomdoherty/chef,criteo-forks/chef,ekometti/chef,someara/chef,cachamber/chef,mal/chef,mattray/chef,custora/chef,nvwls/chef,ducthanh/chef,cachamber/chef,gene1wood/chef,robmul/chef,sideci-sample/sideci-sample-chef,chef/chef,ktpan/chef-play,jagdeesh109/chef,adamleff/chef,legal90/chef,jk47/chef,nicklv/chef,baberthal/chef,BackSlasher/chef,patcon/chef,BackSlasher/chef,b002368/chef-repo,grubernaut/chef,nsdavidson/chef,sysbot/chef,tomdoherty/chef,nalingarg2/chef-1,nguyen-tien-mulodo/chef,erkolson/chef,andrewpsp/chef,karthikrev/chef,bahamas10/chef,patcon/chef,Tensibai/chef,cmluciano/chef,ccsplit/chef,askl56/chef,ckaushik/chef,gene1wood/chef,sometimesfood/chef,Igorshp/chef,aaron-lane/chef,jimmymccrory/chef,tbriggs-curse/chef,ducthanh/chef,mal/chef,ckaushik/chef,martinb3/chef,ranjib/chef,higanworks/chef,skmichaelson/chef,legal90/chef,sempervictus/chef,nguyen-tien-mulodo/chef,Ppjet6/chef,oclaussen/chef,evan2645/chef,someara/chef,h4ck3rm1k3/chef,cmluciano/chef,h4ck3rm1k3/chef,sanditiffin/chef,nathwill/chef,robmul/chef,mwrock/chef,jaymzh/chef,tbriggs-curse/chef,h4ck3rm1k3/chef,bahamas10/chef,onlyhavecans/chef,permyakovsv/chef,acaiafa/chef,lamont-granquist/chef,zuazo-forks/chef,askl56/chef,martinisoft/chef,sometimesfood/chef,jimmymccrory/chef,ducthanh/chef,erkolson/chef,clintoncwolfe/chef,martinisoft/chef,gsaslis/chef,cgvarela/chef,sometimesfood/chef,DeWaRs1206/chef,gsaslis/chef,nalingarg2/chef-1,tbunnyman/chef,adamleff/chef,ekometti/chef,OpSitters/chef,gsaslis/chef,aaron-lane/chef,tas50/chef-1,tomdoherty/chef,permyakovsv/chef,webframp/chef,ckaushik/chef,nvwls/chef,danielsdeleo/seth,smurawski/chef,OpSitters/chef,bahamas10/chef,ckaushik/chef,jblaine/chef,youngjl1/chef,sometimesfood/chef,circleback/chef,brettcave/chef,renanvicente/chef,patcon/chef,ChaosCloud/chef,nellshamrell/chef,custora/chef,cmluciano/chef,jkerry/chef,Kast0rTr0y/chef,malisettirammurthy/chef,mikedodge04/chef,3dinfluence/chef,mikedodge04/chef,permyakovsv/chef,swalberg/chef,sysbot/chef,acaiafa/chef,ChaosCloud/chef,malisettirammurthy/chef,natewalck/chef,EasonYi/chef,renanvicente/chef,ktpan/chef-play,jaymzh/chef,lamont-granquist/chef,circleback/chef,youngjl1/chef,permyakovsv/chef,grubernaut/chef,jkerry/chef,martinisoft/chef,nathwill/chef,paulmooring/chef,Ppjet6/chef,legal90/chef,pburkholder/chef,sekrett/chef,jimmymccrory/chef,chef/chef,mikedodge04/chef,erkolson/chef,aaron-lane/chef,antonifs/chef,jordane/chef,nicklv/chef,mikefaille/chef,antonifs/chef,strangelittlemonkey/chef,erkolson/chef,chef/chef,nellshamrell/chef,criteo-forks/chef,3dinfluence/chef,kaznishi/chef,youngjl1/chef,sideci-sample/sideci-sample-chef,OpSitters/chef,ccope/chef,ckaushik/chef,mio-g/chef,someara/chef,cmluciano/chef,Tensibai/chef,ccsplit/chef,nellshamrell/chef,grubernaut/chef,tbriggs-curse/chef,MichaelPereira/chef,bahamas10/chef,onlyhavecans/chef,nvwls/chef