shared SplitDirectories function between platforms, add robustness to SplitDirectories fix GetProcessName on posix