remove the use of path to join the uri component.
use path.join at the right place.
the output cache tree entries now will have / if sitting in the root.