Function replaceWithWindowsPathIfNeeded