NaviServer Built-in Commands – 5.0.0a
ns_normalizepath - Normalize a path
ns_normalizepath removes any extraneous slashes from the path and resolves "." and ".." references.
For example: [ns_normalizepath /dog/cat/../../rat/../../dog//mouse/..] returns: /dog