bin/check_certificate: support recursing in subdirectories