set exclude-dir or exclude grep flags only if available