Given a filename as a string - return a valid filename as a string. It should be used when a string is procedurally built or when a string is explicitly defined within the code. The function detects escape character sequences defined by a backslash~letter