soon enough , we were at a thousand metres and climbing , swerving through winding roads in the clogged outskirts of beirut , only narrowly missing the houses and apartment blocks clinging to the mountainside .