some fixes on state detection for the vcs thing

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.