vcs extension: fix vcs file status detection

This fixes the following:
  - correct ignore state for directories containing only ignored
    files. (only git and bzr backends)
  - correctly mark as new the contents of untracked directories.
  - auxiliar function _path_contains.
  - small bug in bzr backend status detection.