fix to last commit: do not use regular expression matching to massage path.