Relative path now replaces all occurances of \

When using thge option prefix larger than 1 it failed. 
This was because the replace only replaced the first occurance of \\. 
Replaced it with a regex match that replaces all \\ and allows for prefix subraction bigger than 1.