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 using the suggested approach of conditionally only performing said operations on POSIX OSs.