Fixed URL parse error when using GitHub Enterprise

GitHub Enterprise deployments are a little unpredictable and this patch removes an error when using `mkdocs gh-deploy`.  It also includes a few PEP8 cleanups.