Repository: PyGithub/PyGithub

Issue:
Cannot use get_file_contents with paths containing spaces
The following example fails because the path contains a space:

```python
import github
github.Github().get_repo('Microsoft/dotnet') \
      .get_file_contents('Documentation/compatibility/! Template.md')
```

```
>>> import github
>>> github.Github().get_repo('Microsoft/dotnet').get_file_contents('Documentation/compatibility/! Template.md')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/github/Repository.py", line 1256, in get_file_contents
    parameters=url_parameters
  File "/usr/lib/python3.6/site-packages/github/Requester.py", line 172, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
  File "/usr/lib/python3.6/site-packages/github/Requester.py", line 213, in requestJson
    return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
  File "/usr/lib/python3.6/site-packages/github/Requester.py", line 252, in __requestEncode
    status, responseHeaders, output = self.__requestRaw(cnx, verb, url, requestHeaders, encoded_input)
  File "/usr/lib/python3.6/site-packages/github/Requester.py", line 283, in __requestRaw
    output = response.read()
  File "/usr/lib/python3.6/http/client.py", line 459, in read
    s = self.fp.read()
  File "/usr/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.6/ssl.py", line 1002, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.6/ssl.py", line 865, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib/python3.6/ssl.py", line 625, in read
    v = self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer
```

If the path is first `quote`d, then it works:

```python
import github
import urllib.parse
github.Github().get_repo('Microsoft/dotnet') \
      .get_file_contents(urllib.parse.quote('Documentation/compatibility/! Template.md'))
```


Discussion:

Resolving patch:
diff --git a/github/Repository.py b/github/Repository.py
--- a/github/Repository.py
+++ b/github/Repository.py
@@ -1252,7 +1252,7 @@ def get_file_contents(self, path, ref=github.GithubObject.NotSet):
             url_parameters["ref"] = ref
         headers, data = self._requester.requestJsonAndCheck(
             "GET",
-            self.url + "/contents" + path,
+            self.url + "/contents" + urllib.quote(path),
             parameters=url_parameters
         )
         if isinstance(data, list):
@@ -1311,7 +1311,7 @@ def create_file(self, path, message, content,
 
         headers, data = self._requester.requestJsonAndCheck(
             "PUT",
-            self.url + "/contents" + path,
+            self.url + "/contents" + urllib.quote(path),
             input=put_parameters
         )
 
@@ -1370,7 +1370,7 @@ def update_file(self, path, message, content, sha,
 
         headers, data = self._requester.requestJsonAndCheck(
             "PUT",
-            self.url + "/contents" + path,
+            self.url + "/contents" + urllib.quote(path),
             input=put_parameters
         )
 
@@ -1405,7 +1405,7 @@ def delete_file(self, path, message, sha,
 
         headers, data = self._requester.requestJsonAndCheck(
             "DELETE",
-            self.url + "/contents" + path,
+            self.url + "/contents" + urllib.quote(path),
             input=url_parameters
         )
 
@@ -1426,7 +1426,7 @@ def get_dir_contents(self, path, ref=github.GithubObject.NotSet):
             url_parameters["ref"] = ref
         headers, data = self._requester.requestJsonAndCheck(
             "GET",
-            self.url + "/contents" + path,
+            self.url + "/contents" + urllib.quote(path),
             parameters=url_parameters
         )
 


Test patch: