Ensure correct permissions on key file