You just have to pass `$path` through `$world->replace_variables()` in the step definition.