'Mutate the path instead of the file.
:param url: A URL to transform.
:return: A list of URL\'s that mutate the original url passed
as parameter.
>>> from w3af.core.data.parsers.doc.url import URL
>>> u = url_fuzzer()
>>> url = URL( \'http://www.w3af.com/\' )
>>> list(u._mutate_path(url))
>>> url = URL( \'http://www.w3af.com/foo.html\' )
>>> list(u._mutate_path(url))
>>> url = URL(\'http://www.w3af.com/foo/bar.html\' )
>>> mutants = list(u._mutate_path(url))
>>> URL(\'http://www.w3af.com/foo.tar.gz\') in mutants
True
>>> URL(\'http://www.w3af.com/foo.old\') in mutants
True
>>> URL(\'http://www.w3af.com/foo.zip\') in mutants
True'

def _mutate_path(self, url):

    url_string = url.url_string
    if (url_string.count('/') > 3):
        url_string = url_string[:url_string.rfind('/')]
        to_append_list = self._appendables
        for to_append in to_append_list:
            newurl = URL((url_string + to_append))
            (yield newurl)
