Fixed wrong condition in examples/simple/igraph_get_shortest_paths.

This PR refers to https://github.com/igraph/igraph/issues/562