NewDataFolder error "expected name"

I'm working with a function that was not written by me, and running into an error where nothing is accepted as a name by the NewDataFolder function (the error text is, "While executing NewDataFolder, the following error occurred: Expected name). I've just upgraded to Igor 6.34A for Mac, although I'm not sure whether this is associated with that upgrade.
    String SavedDF = GetDataFolder(1)
    NewDataFolder root:LineFitting:
    SetDataFolder root:LineFitting
    String Path = UniqueName("Fit_"+nameofwave(DataY)+"V"+nameofwave(DataX),11,0)
    Overwrite =1
    if (Overwrite)
        Variable PathLen = strlen(path) - 1
        Variable n = max(0, str2num(Path[PathLen]) - 1)
        Path = Path[0,PathLen-1]+num2str(n)
    endif
    Path = "root:LineFitting:'path'"
    NewDataFolder Path

Is it possible that this is an issue with the new Igor version, or is there a problem with the use of the NewDataFolder command here?
remove the single quotes from the folder path and place a $ sign in the newdatafolder command to use the contents of "Path" instead of making a folder that is named Path