path = replace(path,"\","/","all);
No messing about. Just convert Windows silly \ to / and you're done. It works everywhere. Please stop trying to be cross-platform and do the right thing instead. What triggered this rant? The latest varScoper code doesn't work on Mac OS because of this nonsense. Change line 29 of varScoper.cfm to just:
<cfset var pathsep = "/" />