started to use path.relative instead of regex, supports also windows.