The closure of an open set in $\mathbb{R}^n$ is a manifold I want to solve the following exercise from M. Spivak's Calculus on Manifolds (p. 114):

(a) Let $A \subseteq \mathbb{R}^n$ be an open set such that boundary $A$ is an $(n-1)$-dimensional manifold. Show that $N=A \cup \text{ boundary }A$ is an $n$-dimensional manifold-with-boundary. (It is well to bear in mind the following example: if $A=\{x \in \mathbb{R}^n: |x|<1 \text{ or } 1<|x|<2 \}$ then $N=A \cup \text{ boundary }A$ is a manifold-with-boundary, but $\partial N \neq \text{boundary }A$.)
(b) Prove a similar assertion for an open subset of an $n$-dimensional manifold.

My attempt:
If $x \in \text{int } N$ then $x$ satisfies the manifold condition "(M)" from the textbook: Setting $U=V:=\text{int }N$ and $h=\text{Id}_U$ we have that $h$ is a diffeomorphism $U \to V$ with $h(U \cap N)=V \cap \mathbb{R}^n$.
If $x \in N \setminus \text{ int }N$ I want to prove that $x$ satisfies the condition $(M')$: there exist open sets $U' \ni x,V'$ in $\mathbb{R}^n$ and a diffeomorphism $g:U' \to V'$ such that $g(U' \cap N)=V' \cap \mathbb{H}^n$, where $\mathbb{H}^n$ is the half space where the last coordinate is non-negative. The condition "(M')" also requires that $g(x)$ has its last coordinate$=0$.
Now, since boundary $A$ is an $(n-1)$ dimensional manifold we have the existence of open sets $U'' \ni x,V'' \in \mathbb{R}^n$ and a diffeomorphim $f:U'' \to V''$ such that $f(U'' \cap \text{ boundary }A)=V'' \cap (\mathbb{R}^{n-1} \times \{0\})$.
I now want to say that we can pretty much use the same $f$ as $g$. As $f(U'' \cap A)$ must not intersect the hyper-plane $\{x_n=0\}$. If $U'' \cap A$ is connected I can compose with a negation if necessary to make the image be in the half-space $\mathbb{H}^n$. However, if there are several connected components I couldn't do anything.

Can anyone please help me finish this proof?
Thank you!
 A: Here is my attempt at proving that if $x \in N \setminus \text{int }N$ then $x$ satisfies $(M')$:
Since such points $x$ must be in the boundary of $A$ we have, since $\text{bd } A$ is an $(n-1)$ dimensional manifold, that there exist open sets $U \ni x,V \subseteq \mathbb{R}^n$ and a diffeomorphism $h:U \to V$ such that $h(U \cap \text{bd }A)=V \cap (\mathbb R^{n-1} \times \{0 \})$. If necessary, restrict $V$ (and correspondingly $U$) to a small open ball around $h(x)$.  
Let $\mathbb H^n_\pm:=\{y \in \mathbb R^n:(-1)^{\pm 1} y_n>0\}$. We claim that if there exists a point $p \in U \cap A$ such that $h(p) \in V \cap \mathbb{H}^n_{\pm}$ then $V \cap \mathbb{H}^n_{\pm} \subseteq h(U \cap A)$: Suppose by way of contradiction that there exists a point $q \in V \cap \mathbb{H}^n_{\pm} \setminus h(U \cap A)$. The line segment $\overline{pq}$ will give rise, under $h^{-1}$ to a boundary point of $A$. However, the boundary points of $A$ in $U$ are in 1-1 correspondence with $V \cap (\mathbb{R}^{n-1} \times \{0 \})$. Hence the image $h(U \cap A)$ is either $V \cap \mathbb{H}^n_+,V \cap \mathbb{H}^n_-$ or the union of the two.
The image can definitely not be the latter, as $x$ would be an interior point of $N$ in that case. Thus $h(U \cap A)=V \cap \mathbb{H}^n_{\pm}$ for some sign $\pm$. In the minus case, compose $h$ with the function that negates the $n$th coordinate. 
