Rewrite each path

r? @nikomatsakis