The refugees barely escaped with their lives.

Literal

Refugees [topic-は] finally life-saving did.

命拾いをした means 'had a narrow escape, barely survived' — literally 'picked up one's life.' やっと means 'barely, finally, with difficulty.'