Fixing absolute URLs for empty urls

Empty urls are now handled properly as well as relative "./" or "." urls

@tractorcow

re #3323 and #3345
Hmm, the issue is that this function is used to make links in HTML templates have absolute URLs, so this is adding the ability to convert those links correctly.

It's not *needed* for the exact bug I need to fix, but this is a closely related issue.

To be clear, my issue is `<a href="">` causes a php warning due to the array access of the string that has no length (ie: no zero index)