$WAGLOBAL_localRoot = "/test/cms/" ;
$WAGLOBAL_remoteRoot = "/cms/";
The code should check to see if the directory specified as the local root exists. If it exists it will use that otherwise it will use the remote root value. So it should just work on both once it is set correctly in your case.