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`.
Fix non-ASCII directories processing

Fixes #788
Home may be None, respect it
Install bazaar with --allow-external
Also use --allow-unverified
Revert change to segment parameter default value
Update tests to support parameter on _get_capacity()