Moving P\Invoke to CS file.

Moved P\Invoke to a CS file so that you can use visual studio and get
intellisense. P\Invoke.ps1 just reads the CS file and compiles it that
way.