Handle trailing slash

I'd rather make this a local variable, since it's only used in the test method itself. Instance attributes imply state that persists between method calls, which isn't the case here. (In particular, it's easy to write helper methods that assume `self.transport` exists and misbehave when it doesn't or when there's more than one transport instance.)