Create files with the correct permission instead of changing it afterwards.

No intended functionality change.