Add fix for API when branch names have periods in them.  Relates to issu...

...e #6128 (https://github.com/gitlabhq/gitlabhq/issues/6128).

I did not find any tests for this, otherwise I would have updated them too.