added segments method

Needed a segments method to return all segments in an array
fixed bug with UrlGenerator and bound routes

When binding a variable in a route the bind closure is called when
generating a URL using UrlGenerator