Smarter updating of URL Hints

This is for #6244 

I updated the `UrlCodeHints` provider so that **folders** are *inserted* and **filenames** are *replaced*.

@cantrell (#6244) and @peterflynn (#7492) Does this fix your concerns? Let me know if I missed any cases.

UPDATE: removed @brylie  because #6345 is a separate (already fixed) issue.