Add the Mac Catalyst platform to the Apple target.
Add quotes around variables that might contain spaces and get passed to the shell.
Pre-create the build directories for Linux and Windows. (Otherwise, these directories are created on-demand by the xgo Docker image, which results in them being owned by root and read-only to the user.)
There are three main changes here: