Put check_writable_by_others in GenericAgentConfig, small cleanups