Proof (path with finitely many horizontal and vertical segments in domain)
This is a consequence of $\C$ being compact.
Since $U$ is path-connected, let $γ: [a,b]\to U$ be a path from $z$ to $w$. For each point $u\in γ[a,b]$ on the path, there exists an open disk $D_u$ centred at $u$ as $U$ is open.
$γ[a,b]$ is the continuous image of a compact set and thus compact, and has an open cover $\mathcal{U} = \set{D_u \cap γ[a,b]}_{u\in γ[a,b]}$, so there is a finite collection $\set{D'_1, \ldots, D'_n} \subseteq \mathcal{U}$ that still covers $γ[a,b]$.
Inside each disk, replace $γ$ with horizontal and vertical segments.