On several tasks if you pass a directory as a file to ssh-keygen, the program wouldn't check the file mode to check if it's a directory like: `Saving key "./test/" failed: Is a directory` After asking the user to overwrite or not. The file mode is already readed when getting `stat` Do you think checking it is a good idea? I've done something like: