tools: Add a interpolate function that can interpolate % variables into a path.