Fix key file permissions