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

This bug fixes issues in test cases where:

* Path comparison where '/' and '\' would distinguish otherwise equivalent paths
* Various line delimiters would break string comparison
* Issues where test cases would fail if the execution directory did not match the site root.

This also applies this consistent logic in TempPath.php to ensure that generated directory filenames are consistent with the underlying operating system.

Extracted from https://github.com/silverstripe/silverstripe-framework/pull/1360