[FIXED JENKINS-18564] Do not run file system checks designed for POSIX OS's on non POSIX OS's.

This is a fix for [JENKINS-18564](https://issues.jenkins-ci.org/browse/JENKINS-18564) using the suggested approach of conditionally only performing said operations on POSIX OSs.