Never mind, looks like we don't need to run 2 different commands to check git's ignored files after all

It is fixed in the latest version of git.
Add the '--directory' flag to git when checking for the list of ignored files.