This will use DefaultPOSIXHandler and the native POSIX implementation,
falling back on the pure-Java implementation if native support is not available.
The POSIXHandler class allows you do implement the runtime-specific behavior you need in
such a way that it is insulated from the implementation of the POSIX library.
The logic here is a bit strange and this copies MRI (Ruby) which may not be language
agnostic, but windows (win7 and others) automatically mark folders as read-only when
it contains other files and folders within it.