Better handling of known isDirectory + TestSave using private keys