Refs #13. Don't use unstaged .gitattributes. Don't mix exclude patterns from different repos.
Use the cwd argument instead of chdir.