Fixes #5238: Fix perms on created promises

Could you:
- put setWritable just after file creation, so that we never have the content of the file with the bad rights
- user .setWritable(true, true) - yes, even if it's the same, the intent is clearer
- add a comment above or after setWritable like: "CFEngine check that only owner has write permission, so don't rely on user umask config to hope it's ok"