4769. [bug] Enforce the requirement that the managed keys directory (specified by "managed-keys-directory", and defaulting to the working directory if not specified) must be writable. [RT #46077] (cherry picked from commit56e30ebae6) (cherry picked from commitb6b2b0b9b5)