Relative path now replaces all occurances of \

When using the option prefix larger than 1 it failed. 
This was because the replace only replaced the first match of \\ in the relative path. 
Replaced it with a regex matches all occurrences of \\ and allows for prefix subtraction bigger than 1.