http://bugs.dwscoalition.org/show_bug.cgi?id=4927

Changed $basepath to use the entry's url method rather than building the
link directly with the item id to make the link compatible with pretty
URLs (see bug 5087).