Fixed the avatar problem when gitlab is deployed at the relative url.

The commit fixes the following problems:
The avatar is broken when the gitlab is deployed at the relative url.
(Gitlab-7.0-stable)
The avatars in the network diagrams are displayed incorrectly. (Before
Gitlab-7.0-stable)
Why did you step away from the `URI::join` way?