Add "refresh" to pkg.list_upgrades (apt)

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