You may be thinking of "We were lucky to get out of here with your skin intact," which is a standard idiom.
With a whole skin and Get away while you are safe just sound very odd. Get out while the gettin's good is another one, but you can use while the going's good, too.