Write a new list of records to the key file.
a KeyFile
a _block_t
an array of _key_t to write
how many records to write
records
-1 on io error. The key file will remain unchanged.