- Added curr_dir_depth, a variable that keeps track of the depth past
the module root when a sanitizing daemon is running.
- Use the new calling syntax for sanitize_path().
- Updated count_dir_elements() to not count a . component.
- Improved sanitize_path() so that it can take a symlink target string
and combine it with the symlink's name when the target is relative.
When working with a symlink, the routine also returns NULL if any ..
elements try to escape past the module root.
- The new routine safe_stat(), is used when sanitizing paths (i.e. when
the daemon does not have chroot enabled). This manually follows a
chain of symlinks, ensuring they don't try to escape the module.