BUG: shortest_path overwrite

Intended to close https://github.com/scipy/scipy/issues/3800.

Other csgraph functions may need similar attention?