rewrite smart url path segment management
Merge branch 'master' into urls

Conflicts:
	tests/tests.py
	tpb/tpb.py
Merge branch 'master' into urls
Merge pull request #26 from unaizalakain/urls

Smarter url handling