Only replace backslashes with forwards slashes on Windows because backslashes are valid in Linux paths.