replace path variable with relative path