Given ICANN’s predilection for stuffing the entire dictionary into the TLD space, it’s probably a losing proposition to try and whitelist actual TLDs (as an amusing note,
.md is a valid ccTLD, for Moldova, so even if we did have a list of “valid” TLDs, README.md is a perfectly valid domain name, and does, in fact, exist – and resolve).
For filenames, specifically, I suggest wrapping them in backticks, which maintains the long-standing convention of monospace fonts for that sort of thing, and which prevents auto-linkification, a la
README.md. Trying to educate people to mark up their links in some specific way, such as wrapping them in angle brackets, or having to include the scheme, or including a forward slash, I think are all doomed to sadness.