char *Ns_NormalizePath( Ns_DString *dest, char *path );
This function removes any extraneous slashes from the path and resolves "." and ".." references. The result is appended to the given Ns_DString. For example
Ns_NormalizePath(&ds, "/dog/cat/../../rat/../../dog//mouse/..");
appends "/dog" to the Ns_DString.