Fixing absolute URLs for empty urls

Empty urls are now handled properly as well as relative "./" or "." urls

@tractorcow

re #3323 and #3345
I'm not sure that this isn't an API change. Do you need this for your pull request?