write keypair (PEM file) as text