Maint: Fix miscellaneous tests
Several tests were broken due to pecularities of Windows
and Ruby on Windows:
- Ruby on windows does not differentiate between group and other file permissions.
- All open file handles must be closed before the file can be deleted
- Sometimes the current working directory (Dir.getwd) is reported as C:/foo and other times as C:\\foo, which confuses the spec tests.
- Ruby's sprintf formats floating point values differently on Windows vs Unix. The Windows exponent has an extra leading zero.
- Needed to stub execution of security command with the SMF service provider.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>