Added a spec to #branches and use #branch? of Rugged

It seems #heads is going to be removed and replaced by #branches. So I've sort of the spec of #heads to #branches.

I've also made it use Rugged::Git::Repository#branch?