This is strange, my file does not look like this. I have the same lines of code but they differ from yours. Here is what the lines of code in my file look like for these lines:
if ($kfm_workdirectory[0]=='/') {
$workpath = $kfm_workdirectory;
} else {
$workpath = $rootdir.$kfm_workdirectory;
}
I'm including a copy of my version of the file for you. Make a backup of your file then use this one to test it out and let us know how it goes.