[nba] Improve _VALID_URL regex (fixes #4387)

Allows for optional trailing / or /index.html
[nba] Modernize
[nba] Add test for #4387