Fix logic for loading rtl.css
header template: fix <html> dir attribute