Handle errors that do not set an exit code

Most powershell commands do not natively return an exit code on failure. In fact, most often an exit code is only returned by command line exeutables. For example:

```
C:>blahbidyblooblahblou
```

or

```
mkdir zzz:\badDir
```

will both fail (unless you have a `zzz:\` drive). Powershell provides `$?` which returns a boolean value indicating success or failure of the last command. This will also return $False if the last comman does return a non 0 exit code. So this change checks the output of `$?` and if there is no `$lastexitcode` then it exits 1.