Port GetMainExecutable over to PathV2.

I will remove the V1 version as soon as I change clang in the next commit.