Let $d\in\mathbb N$, $M\subseteq\mathbb R^d$ and $x\in M$. $\gamma$ is called curve on $M$ through $x$ if $\gamma:I\to M$ for some nontrivial interval $I\subseteq\mathbb R$ with $0\in I$ and $\gamma(0)=x$. In that case, $\gamma$ is called regular if $\left.\gamma\right|_{I^\circ}\in C^1(I^\circ)$ and $\gamma'$ has a continuous extension to $I$.
We know define the tangent space of $M$ at $x$ to be $$T_x\:M:=\left\{\gamma'(0):\gamma\text{ is a regular curve on }M\text{ through }x\right\}.$$
Am I correct that the reason why we do not simply define a curve to be defined on an open interval is that this definition would not yield an appropriate definition of $T_x\:M$ if $M$ is a submanifold with boundary? In any case, why is it guaranteed that the extension of $\gamma'$ is unique?
Maybe one quick note. If $p$ is a boundary point, then the set of all tangent vectors is just a half space, since there is a missing outward direction. This can be completed by saying, that $T_pM$ is the smallest vector space containing all tangent vectors mentioned above.