Fix issue with string.replace methods removing backslashes (windows paths for instance as user.home, but other examples might exist).