Fix up CKFile and add tests