Default "refresh" to False in pkg.upgrade (apt)

This fixes #3300. Also made pep8 fixes. python-mode FTW!