Refactor kfile_test to use the new kfile_mem module.