Make path replace configurable

Add option for path replace when compiling with namespace.