(#11930) Use FileUtils.mkdir_p to recursively create directories
Previously, Puppet::Util::Log::DestFile was using Puppet.recmkdir
to recursively create parent directories. However, the latter method
assumed POSIX-style paths and did not work on Windows.
Also, if the Puppet.recmkdir method failed to create any of the
parent directories, it would rescue the exception and return
false. However, Puppet::Util::Log::DestFile did not check the return
code, and would fail later when trying to create/open the file.
This commit removes the Puppet.recmkdir method and changes
Puppet::Util::Log::DestFile to use FileUtils.mkdir_p instead,
which works with both POSIX and Windows paths. This commit also
preserves the behavior of creating each parent directory with mode
0755 (but not changing the mode for existing parents).
If one of the parent directories cannot be created, e.g. EACCES, the
FileUtils.mkdir_p method will raise an exception, similar to how
File.open would raise previously if one of its parent directories
could not be created.