better handling of trailing slashes in urls for socket.io