Update Director.php

The template variables $AbsoluteBaseURL $BaseURL and the deprecated $BaseHref are cast as HTMLText by default in SSViewer. As a result they are appended with a newline character.

When trying to build custom links with these variables this newline breaks the links and makes the html unreadable. Casting as Text fixes this problem.