set the permissions on a symmetric keyfile before anything is written to it, rather than after it is closed