api#__folder_get_single: major bug fix. improve debug information

The method compares two paths, by counting slashes. So these two paths are
different: /foo/bar/ and /foo///bar//.

We need to remove all duplicated / before comparing. Not so good, though