The evolution of triples with a Roche-lobe filling outer star