Improving URL parsing in RouterRH and SessionManRH

This fixes #215 but I definitely need to start working
on #84.