Writes and removes the keyfile. The default uses the filesystem; injectable in tests.
Remove path; a missing file is not an error.
path
Write contents to path, readable by its owner only.
contents
Writes and removes the keyfile. The default uses the filesystem; injectable in tests.