Peer bugfix

Fixing the issue found during the workshop where we were creating bad websocket links if there was a trailing / in a `link()` call. This should fix that. Added tests as well.