DOC: Update title caps validation script to step through directories
Add words that should remain capitalised:
``` 
"RangeIndex",
"SparseArray",
"SparseDtype",
"HTTP",
"XML"
```

Before:
when specifying a directory in the form: `doc/source` for the script, it would throw an error, because it was looking for only files

After:
can now enter:
`script/validate_title_capitalization.py doc/source` and it will traverse all the directories below it. 

- [X ] related to  #32550 
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [X ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ X] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Regarding the checks: 3 are being cancelled. The last one, ci/circleci: test-arm, I don't know why that's failing. I updated my local  repo to latest from upstream/main and ran the same test, which passed @skregas thanks for the work here, do you still want to continue with this PR? There is the comment above that you may want to check if that's the case Closing as stale, but thanks for the work @skregas, and if you eventually want to address the comments, please let me know and I can reopen the PR.