Added the is_rtl function and some tests.