Test and fix for dealing with path regexes with multiple subexpressions

Hi Rodrigo,

I've been using mux to do some fairly complicated regex matching with multiple named patterns containing multiple subexpressions. This fix and test covers my use case. Let me know if you want any more tests or the same treatment for host regexes.

Cheers,
Donovan.