(#12412) Use host-specific methods for generating tmp file/dir
Previously, each test case was hard-coding the path of its
tmpfile/dir, and then passing the posix style path to puppet,
e.g. puppet resource file path, which won't work on Windows.
This commit changes the tests to use the tmpfile/tmpdir method on the
Host instance, and converts the tests from on agents style to
agent.each do |agent|.