Don't send an emtpy ref to the client

The api will return `404 Not Found` when sending an empty ref.

As this is default behavior in most of the Api classes I added a check to remove this value if it equals null.

ex invalid call:
`curl -i https://api.github.com/repos/KnpLabs/php-github-api/contents/lib?ref=`