This is the only thing that jumped out at me. Would it be more reliable to just check if the string contains a colon in it? That would let us know that a scheme was specified. And the only time a colon should appear in a filepath is on Windows, in which case the filepath is absolute anyway.