Fixed the bug.

The “Ubuntu1804” image I was using on AppVeyor was running PowerShell Core 6.1.0-preview. My problems were caused by bugs in the preview version. Switching the image over to “Ubuntu” changes to PowerShell Core 6.0.2 which does not have this bug.

I can sleep now.