Note that the theme hook passes $element['#href'] to the l() function. Thus, for *local* links, #href is really the "path" rather then the fully expanded "href url".

Be careful using the url() function to set the value of $element['#href'] since when this is passed to l() you can end up with the base_url subdirectory path getting duplicated in the final url link. In other words remember that l() already calls url() so you don't want to do it twice.