refactory getNormalizePath