Raise a warning for a pathway without any synapses instead of failing with a cryptic error message

Fixes #371