Various test file permission fixes
Ubuntu 23.10 sets umask to 0002 by default, this is different to the typical linux umask of 0022, and it meant that the testsuite was not passing as some file permission tests were not properly taking umask into account.
CI does not yet verify that we are umask agnostic, but it is simple enough to verify locally by setting umask before running the test suite.
E.g.
$ umask 000
$ make test-go
...
$ umask 002
$ make test-go
...
$ umask 022
$ make test-go
...
Edited by James Fargher