Added test to ensure the public key file is writeableAlso added test to check for absent public key, when private key is present.