Use system.getHostname() everywhere
Replace os.environ['HTTP_HOST'] with system.getHostname(), as a
result we do not crash when 'HTTP_HOST' is unset now.
# use glob syntax.
syntax: glob
*.pyc
*.zip
*~
.project
.pydevproject
app.yaml
build
tests/coverageResults
*,cover
tests/.coverage
*.git
*.egg-info
eggs
parts
.installed.cfg
bin
develop-eggs
.gitignore
.DS_Store
.settings