1377 - Blacklist dependencies from SCM tracking

Git excludes dependencies from commit. 
Mercurial just shows a warning because it doesn't support excludes on commits. Just hgignore
(When re-using the file descriptor from the outer `with` statement there's no need to `close()` it any more then.)