New method saveKnownNodes

saveKnownNodes writes the known nodes to disk if necessary. The force argument is used to write to disk even if not necessary.