Validate artefact paths and prefixes.

This matches the validation that the router-api does when registering routes.