Differentiable functions between manifolds are continuous

Let $f:M \to N$ be differentiable function between manifolds. I want to show that $f$ is continuous.

First, that $f$ is continuous should mean (correct me if I'm wrong!) that for every point $a\in N$ and for every open set $V$ of $N$ that contains $a$, $f^{-1}(V)$ is an open set of $M$.

Now my attempt to prove it:

Let $U=f^{-1}(V)$ and let $\psi:V\to \mathbb{R}^m$ and $\phi:U \to \mathbb{R}^n$ be charts.

That $f$ is differentiable means that $g=\psi \circ f \circ \phi^{-1}$ is differentiable as a real function. Therefore $g$ is continuous.

Now, the charts are continuous by definition. So since all the functions involved are continuous, $\psi \circ g \circ \phi^{-1} (V)$ is open. But $\psi \circ g \circ \phi^{-1} (V)=f^{-1}(V)$

Is this correct?

...for every point $a \in N$ and for every open set $V$ of $N$ that contains $a$, $f^{-1}(V)$ is an open set of $M$.
There is no need to select a point $a \in N$; in fact, doing so is misleading. First, two definitions for clarity. A map $F: M \rightarrow N$ is continuous if and only if for all open sets $W$ of $N$, the preimage $F^{-1}(W)$ is an open set of $M$. A neighborhood of a point $p \in M$ is an open set of $M$ which contains $p$. Now let us see how my definition of continuity differs from yours. Let ${\cal S}$ be the collection of all neighborhoods of all points of $N$. Let ${\cal T}$ be the collection of all open sets of $N$ (the topology of $N$). Since $A \in {\cal S}$ implies $A$ is open, we have ${\cal S} \subset {\cal T}$. Now let $B \in {\cal T}$. If $B$ contains a point $b$, then $B$ is a neighborhood of some point of $N$, so $B \in {\cal S}$. However, ${\cal T}$ contains a single set $\emptyset$ which is not a neighborhood of any point of $B$. Thus $${\cal S} = {\cal T} \backslash \{\emptyset\}$$ Suppose $F$ is continuous under my definition of continuity. Then since each neighborhood in $N$ is an open set of $N$, $F$ is continuous under your definition. But suppose your definition of continuity. The preimage of all members of ${\cal S}$ are open, but what about the preimage of $\emptyset$? Well, the preimage of $\emptyset \subset N$ is $\emptyset \subset M$, so your definition of continuity just so happens to work. However, it works based on a kind of "side effect" regarding the set-theoretic properties of $\emptyset$.
On to your proof. The first problem I see is that you write $\psi \circ g \circ \phi^{-1}(V)$, though $V \subset N$, and $\phi : M \rightarrow \mathbf{R}^n$, so $\phi^{-1}(V)$ doesn't make sense. Nor would $\phi^{-1}(U)$. Thus I'm not sure how to fix this part of the proof. Next, you are right that we need to use the fact of differentiability to imply continuity. But it seems to be slicker here to stick to functions instead of dealing with open sets. My proof below will do so.
Let $F: M \rightarrow N$ be differentiable with $(U,\phi)$ a chart of $M$ and $(V,\psi)$ a chart of $N$ with $F(U) \subset V$. The map $$\psi \circ F \circ \phi^{-1}: \phi^{-1}(U) \subset \mathbf{R}^m \rightarrow \mathbf{R}^n$$ is differentiable by assumption, and hence contunuous. Since $\phi$ and $\psi$ are homeomorphisms, all of $\phi$, $\phi^{-1}$, $\psi$, and $\psi^{-1}$ are continuous. Then $$\psi^{-1} \circ (\psi \circ F \circ \phi^{-1}) \circ \phi : U \rightarrow V$$ is continuous as the composition of continuous maps. Since this holds for all charts $U$, and the charts cover $M$, we know that $F$ is continuous on $M$ by the topological gluing lemma.