Cleanup import in segments.common:

- move `import re` to top
- if import is in a `try` block and there is some processing before it and
  `except` move this to `else`.
Merge branch 'common-imports' into develop
Fix non-ASCII directories processing

Fixes #788
Merge branch 'fix-788' into develop
Home may be None, respect it
Install bazaar with --allow-external
Also use --allow-unverified
Merge pull request #790 from ZyX-I/tests-fix

Fix travis CI build
Added OSX battery support
Refactored OSX battery code
Revert change to segment parameter default value
Update tests to support parameter on _get_capacity()
Merge branch 'osx-battery' into HEAD
Improved battery segment:

- Ignore `steps` if gamify is False.
- Add `full_heart` and `empty_heart` keywords.
- Document `format` keyword.
- Replace `draw_soft_divider` with `draw_inner_divider`.
Merge pull request #792 from ZyX-I/improved-battery

Improved battery segment:

Closes #791.