Adding --repository check option to doctor command.

* --repository checks to see if any of the entries are missing in
phyiscal storage.
* I've improved the io.print_errors function by also requiring that
defective records be sorted before they are printed.
* Renamed --exists option to --records to make it more in-line with
--repository.