Check parent directories for VCS ignore files.

This is rebase of #169 against current master.
Fixes up #144.