def write_private_key_file(self, filename, password=None):
raise Exception('<STR_LIT>')<EOL>
Write private key contents into a file.  If the password is not
C{None}, the key is encrypted before writing.

@param filename: name of the file to write
@type filename: str
@param password: an optional password to use to encrypt the key file
@type password: str

@raise IOError: if there was an error writing the file
@raise SSHException: if the key is invalid