Fix tests and implement support for default key_file and key_comment values.