A question about the proof $\pi_1(S^1,1) \cong \mathbb{Z}$

I am working through the proof that the fundamental group of $S^1$ is isomorphic to $\mathbb{Z}$ from the book Basic Topology by Armstrong. There they are defining a map $\pi: \mathbb{R} \to S^1$ by $x \mapsto e^{2\pi i x}$. What bothers me is the following claim :

If $n \in \mathbb{Z}$, then then the restriction of $\pi$ to $(n-\frac{1}{2}, n+\frac{1}{2})$ is a homeomorphism from $(n-\frac{1}{2}, n+\frac{1}{2})$ to $U=S^1 \setminus \{-1\}$. i.e the map $\pi|_{(n-\frac{1}{2}, n+\frac{1}{2})}: (n-\frac{1}{2}, n+\frac{1}{2}) \to U$ is a homeomorphism.

I have proved that this is injective but I can't deal with the surjectivity part and also with the inverse of $\pi|_{(n-\frac{1}{2}, n+\frac{1}{2})}$. My guess is that the inverse will look something like $u \mapsto \frac{1}{2\pi i}\ln{u}$, but I can't handle it rigourously. Any help regarding this problem will be appreciated. Thank you.

-
Have you tried visualizing what is happening in your head, or perhaps drawing a picture? It seems clear that as $x$ transverses the interval $(n-1/2, n+1/2)$ (which is of length 1) that $\exp(2\pi i x)$ goes around the entire circle except $1$ point. – Ragib Zaman Jun 10 '12 at 7:10
Also, rather than worrying about a formula for the inverse function, you could prove that the map is open (i.e. that its inverse is continuous) by showing that it extends to a homeomorphism from the quotient space [n-1/2, n+1/2]/{n-1/2,n+1/2} to $S^1$. The latter is easier to deal with, because now you're looking at a continuous bijection from a compact space to a Hausdorff space. – Dan Ramras Jun 11 '12 at 6:25