Fix some New-InstallScript bugs