Fix issue with PathParam replacement in client proxy

Whenever a `PathParam` annotation contains a regexp, name replacement wasn't performed properly and resulted in URI malformed exception during `invoke` phase.

Replacement now properly deals with an optional path regexp.
Merge pull request #491 from pdeschen/master

Fixes issue with PathParam replacement in client proxy