Geodesically complete spaces with an upper curvature bound