Added a URI traversal funtion

will be used in twist redirect and template uri