Some observations/thoughts on clock mode at startup.
Cameras that do have it, appear to emit either a "AC:BootClock" (old cameras) or "AC:BtClk" (new cameras) debug message upon reaching it in the startup process. Following this debug message, there is a firmware variable that gets set to a certain value ("1" in both the ixus65 and the a3200). The problem with this is the chance of race condition, I have no idea how fast the camera's boot process is compared to "our" spytask. The variable's default value seems to be 0.
I have briefly experimented on two cameras (see above), the removal of mkdir calls enabled CHDK to start in clock mode. Subsequent file operations were successful on the old Vx cam, and all file operations failed on the new DryOS one (including the reading of the config file!). Once clock mode was left, file operations have started to work.
A possible solution could be something like: enable the mkdir calls in spytask only when the above mentioned variable is "safe", i.e. 0
On DryOS cams which fail to load the config in clock mode, perhaps that default config shouldn't be saved when file operations start working.
And the good news: some low-end cameras don't have clock mode at all...