Another way of doing this is to use paths of arbitrary length. Moore's original definition of this was in terms of pairs $(r,f)$ where $r \geqslant 0$ and $f: [0, \infty) \to X$ is map which is constant on $[r, \infty)$. We define $\partial ^-(r,f)= f(0), \partial^+(r,f)=f(r)$. The composition $(r,f)\circ (s,g)$ is defined if and only if $f(r)=g(0)$ and is then $(r+s,h)$ where $h(t)= g(t)$ for $ 0 \leqslant t \leqslant s$ and is $f(t-s)$ for $t \geqslant s$. The composition is associative, so this gives a category structure with identities of the form $(0,f)$.
One also defines $-(r,f)= (r,f')$ where $f'(t) = ???$ (I leave this as an exercise!).
A homotopy $H: (r_0,f_0) \simeq (r_1,f_1)$ is a pair of continuous functions $$H_1: [0,1] \to [0,\infty), \quad H_2: [0,1] \times [0,\infty) \to X$$ such that for each $t \in [0,1]$, $H_2(t,s)$ is constant in $s$ for $s \geqslant H_1(t)$ and $H_1(0)=r_0, H_1(1)=r_1,$ $ H_2(0,s)=f_0(s),$ $H_2(1,s)= f_1(s)$. All this is to ensure that for all $ t \in [0,1]$, $(H_1(t),H_2(t,-))$ is a Moore path.
One needs essentially only one diagram and formula to show that $-(r,f) \circ (r,f)$ is homotopic to an identity.
(I'll think a bit as to any improvements in this!)
One thus obtains the fundamental groupoid $\pi_1 X$. If $X$ is not path connected, one might also want to consider $\pi_1(X,A)$, the full subgroupoid on the points of $A \cap X$, where for example $A$ consists of at least one point in each path component of $X$. This follows the general rule: don't throw away information until you have to. For example, if $X = U \cup V$ and $U \cap V$ is not path connected then you have no rule as to where to choose a single base point. So choose as many as you like!
Edit The book Topology and Groupoids takes a slightly different line, in defining a path of length $u$ in $X$ to be a map $a: [0,u] \to X$. One again gets a category of paths, with a reverse, but one needs a definition of homotopy different to the above. It is easy to define a homotopy rel end points of paths of the same length $u$, as a map from $[0,u] \times [0,1]$ to $X$. If $r,s \geqslant 0$ and $a, b$ are paths of length $u,v$ then one can define paths $r+a, s+b$ of length $r+u,s+v$ respectively where $r+a$ denotes the obvious path $[0,r+u] \to X$ which is constant on $[0,r]$ and then given by $a$. So one defines $a,b$ to be homotopic rel end points if there are $r,s \geqslant 0$ such that $r+a, s+b$ are of the same length and are homotopic rel end points.
I leave you to decide which method you like best. The advantage of Moore's definition as pairs is that it leads easily to a space $M(X)$ of Moore paths in $X$ which contains for each $x \in X$ a loop space $\Omega(X,x)$ which is a strict topological monoid.
I also wrote up in arXiv:0909.2212 a shot at Moore hyperrectangles.