Added option to include/ignore file extensions in `scripts/validate_unwanted/patterns.py`
- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

---

This is needed for the check in #32942 to ignore cython files.