/**
 *
 * Scanner::check
 *
 * Check consistency of the given directory.
 *
 * * p1 (top_path) The top directory to scan.
 *
 * * return 0 on success
 *
 */
static VALUE scanner_check(VALUE self, VALUE top_path) {