update puppet agent to version 3.6.2_1
replace popen with function calls