Use wp_basename() to set $terms value in parse_request hook.

This fixes let urls as /en/category/parent/child/ work. $terms should get the value of ```child``` and not ```parent/child```. This is also how WordPress internally does it.