BUG 3.0 Fixed cross-platform issues with test cases and file utility

Fixes for platform compatibility issues when running test cases.

Please see https://github.com/silverstripe/silverstripe-framework/pull/2472 for SS 3.2 version and https://github.com/silverstripe/silverstripe-framework/pull/2478 for SS 3.1 version.