Write certificate on read instead of write.

[#81019816]

OG PR here: #233 for more information
Making it an argument would probably make it more clear that `#remote_deployment_model` needs that variable in place. I think that `cert_file` should be a local and not an instance variable because it is *not* a useful object beyond the point where `#with_remote_deployment_model` finishes work.