bad path munging

@AndyMenzies can you check and merge please, ta.