Replace directory separator '/' and surrogate path separator ',' by
platform-specific separators File.separatorChar and
File.pathSeparatorChar, respectively. Also make sure that replacement
occurs during write access, not read access. This was handled
differently in both sibling classes.
I am not sure if that helps to fix any Linux CI tests, but it is worth a
try.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>