getCommonPathPrefix implemented for unix\windows\mac\linux