The Unit Sphere $S^{n-1}$ is Path-Connected
The function $n: \mathbb{R}^n \to \mathbb{R}$ given by $n(x)=\Vert x \Vert$ is continuous. The function $i: \mathbb{R} -\{0\} \to \mathbb{R}$ given by $i(x)=\frac{1}{x}$ is continuous. The function $m: \mathbb{R} \times X \to X$ given by $(k,x)\to kx$ is continuous.
Your function $g$ is $\big(m \circ \big(\big(i \circ (n|_{\mathbb{R}^n-\{0\}}^{\mathbb{R}-\{0\}})\big)\times \mathrm{Id}_{\mathbb{R}^n-\{0\}}\big) \big)^{S^{n-1}}$, where upper index means restriction of image and lower index means restriction of domain. Since restrictions are continuous and the "product" $f_1 \times f_2$ of continuous maps $f_1,f_2$ is continuous, the result follows.
Another approach: If $u,v \in S$ are linearly independent, define $f:[0,1]\to S$ by
$$f(t) = \frac{(1-t)u + tv}{|(1-t)u + tv|}.$$
Then $f$ is a path from $u$ to $v$ within $S.$ If $u,v$ are linearly dependent, we can choose $w\in S$ so that $u,w$ are linearly independent. Note $w,v$ are also linearly independent. As above, we can connect $u$ to $w$ and then connect $w$ to $v.$