buildtools: use egrep when we need the "-f patternfile" option