Connectivity by geodesics in open subsets of globally hyperbolic spacetimes