Commonise some path-parsing logic into a couple of helper classes.
More developing of the bundle-munging tools.