change chmod(1) to umask(1)

For the very small possibility there could be an attack on the expected
file, best to set things in order first, before creating the file.