Use path to differentiate persistent TCP streams.

Closes #139.

Backported from master (commit e7f2d28).