Fixes #13371
Currently we check the config file before applying the effect of the -sysperms program option. On first boot with no datadirectory this can result in directories (and settings.json file) being created with incorrect permissions.
As I mention in #13371 this will change default file permissions from what they are currently which might risk breaking changes to upstream projects. If this is not desirable, then the alternative would be to leave the current behaviour and perhaps update the docs slightly.