Add pluggable validation for PathBuilder

Fixes #975
That's fine by me.