If I use --ignore-dir, in my ackrc or on the command line, and I specify a directory that would normally be ignored on the command line, that directory and its descendants are ignored by ack. This commit adds a test for this situation.
A closed standard output means that the first file the child process opens will have file descriptor 1, so that any writes to standard output go there.
ack operates on a line-by-line basis, so a search regex with a newline should never match. There are optimizations present that might cause such a search to match under certain circumstances, so we'll just bail out early for consistency's sake.
Often times, the directory we're choosing whether or not to ignore is the exact same as the one we just looked at (because we're evaluating most of the contents of a directory at a time)