title: Untracked dirs on commit with pygit2
body: <p>I'm working on a non-bare repository with pygit2</p>
  
  <pre><code>index = repo.index
  index.read()
  
  # write in test/test.txt
  
  index.add('test/test.txt')
  treeid = index.write_tree()
  
  repo.create_commit(
      'HEAD',
      author, committer,
      'test commit',
      treeid,
      [repo.head.oid]
  )
  </code></pre>
  
  <p>This is successful, but when I perform a <code>git status</code>, I got this :</p>
  
  <pre><code># On branch master
  # Changes to be committed:
  #   (use "git reset HEAD &lt;file&gt;..." to unstage)
  #
  #   deleted:    test/test.txt
  #
  # Untracked files:
  #   (use "git add &lt;file&gt;..." to include in what will be committed)
  #
  #   test/
  </code></pre>
  
  <p>And after a <code>git reset --hard</code>, everything is fixed.</p>
  
  <p>Is there a way to update correctly the index with pygit ?</p>