Rename to prepareSubDirPath() and replaceSubDir() also returns pathname