Fix bug when loading bad profiles
Fix bug when loading bad profiles

This resolves #817.

A PowerShell instance is created to load and execute profile code.
However, if the profile has a parse error, the instance never gets
created, thus we have to check that it's not null before disposing it.

kmosher/PowerShell,TravisEz13/PowerShell,PaulHigin/PowerShell,JamesWTruher/PowerShell-1,bmanikm/PowerShell,JamesWTruher/PowerShell-1,KarolKaczmarek/PowerShell,bingbing8/PowerShell,jsoref/PowerShell,bmanikm/PowerShell,bingbing8/PowerShell,daxian-dbw/PowerShell,daxian-dbw/PowerShell,bingbing8/PowerShell,JamesWTruher/PowerShell-1,kmosher/PowerShell,bmanikm/PowerShell,daxian-dbw/PowerShell,TravisEz13/PowerShell,TravisEz13/PowerShell,daxian-dbw/PowerShell,bmanikm/PowerShell,KarolKaczmarek/PowerShell,JamesWTruher/PowerShell-1,TravisEz13/PowerShell,jsoref/PowerShell,PaulHigin/PowerShell,jsoref/PowerShell,jsoref/PowerShell,PaulHigin/PowerShell,bmanikm/PowerShell,jsoref/PowerShell,KarolKaczmarek/PowerShell,bingbing8/PowerShell,kmosher/PowerShell,KarolKaczmarek/PowerShell,PaulHigin/PowerShell,kmosher/PowerShell,bingbing8/PowerShell,kmosher/PowerShell,KarolKaczmarek/PowerShell