Path pattern not decoding middle path part

URI decoding of path parts works fine if dynamic part is
at the end but does not work in the middle.

I could not figure out how to fix it but the pull request contains a failing test.

Please let me know if there is anything else that you need.