Currently an access is made on PHP_OS constant inside the Stat implementation. This pauses problems when mocking the Server in a test suite as the commands being run changes.
The OS should be determined in the Factory, at build time instead of runtime.