…stead of in Invoke-Psake
Now Invoke-Psake newer exits whole PowerShell process, so it is possible to run psake more than once in one build server run.
Also it fixes problem with random freezes on errors. They happened because psake tried to find out if it is called by windows service and used ParentProcessId,
but Windows is not Unix;), and this Id can point to terminated or completely different process, and such process can again point to first process, and it causes infinite loops.
Also formatting changes in psake.ps1, now is the same formatting style as in psake.psm1