Fixes issue #490 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.

The following mimics actual code.

```
        int index = 1;
        String path = "{id   : [a-z]*}";
        String name = "id";
        path = path.replaceFirst("\\{" + name + "(\\s)*(:.*)?\\}", "%" + index + "\\$s");
        path = String.format(path, "foo");

        assertEquals("foo", path);
```