We construct a locally compact Hausdorff topology on the path space of a finitely aligned $k$-graph $\Lambda$. We identify the boundary-path space $\partial\Lambda$ as the spectrum of a commutative $C^*$-subalgebra $D_\Lambda$ of $C^*(\Lambda)$. Then, using a construction similar to that of Farthing, we construct a finitely aligned $k$-graph $\wt\Lambda$ with no sources in which $\Lambda$ is embedded, and show that $\partial\Lambda$ is homeomorphic to a subset of $\partial\wt\Lambda$ . We show that when $\Lambda$ is row-finite, we can identify $C^*(\Lambda)$ with a full corner of $C^*(\wt\Lambda)$, and deduce that $D_\Lambda$ is isomorphic to a corner of $D_{\wt\Lambda}$. Lastly, we show that this isomorphism implements the homeomorphism between the boundary-path spaces.