added global option to fixRegerencePath RegExp