On the effect of the path length of small-world networks on epidemic dynamics