misc/check-license: optimize grep call