Do not fail if .gitignore is directory

This is designed to fix libgit2sharp #350 where if .gitignore is
a directory we abort all operations that process ignores instead
of just skipping it as core git does.

Also added test that fails without this change and passes with it.
Merge pull request #1356 from arrbee/fix-directory-as-ignore-file

Do not fail if .gitignore is directory