fix iron pipes not changing direction

Iron pipes were not changing direction if wrench was used (well they did once and then nothing helped) or the redstone signal was switched.

This fixes it by finding next valid facing instead of first valid facing.