Focusing only on GetRealPath
You can save some level of indentation by returning early. The code would become easier to read.
The check If TempFile.Name.IndexOfAny(Path.GetInvalidFileNameChars) >= 0 Then is superflous because the constructor of FileInfo throws an ArgumentException if there are any invalid chars in the filename.
FileInfo doesn't hold ...