adds dir attribute for links