function toPlatformPath(pth) {
    return pth.replace(/[/\\]/g, path.sep);
}
toPlatformPath converts the given path to a platform-specific path. It does
this by replacing instances of / and \ with the platform-specific path
separator.

@param pth The path to platformize.
@return string The platform-specific path.