Check out my answer to http://math.stackexchange.com/questions/706093/https://math.stackexchange.com/questions/706093/ which explains something about Moore paths; concatenation of these gives a category, i.e. is strictly associative with strict identities. The general setting for homotopy classes rel end points of paths is that of groupoids.