Fix PHP notices on Options & Templates admin screens.

$text_direction referred to a global variable which wasn't in scope.
Switch to use is_rtl() instead.