Are you saying the current code runs a URL through expand-file-name?
Instead of using string-match, perhaps we have a predicate somewhere
that tests strings for being a URL?