Ignore correctly

- Fix a bug that dosen't ignore subdirectory like a `dir1/*.txt`
- Refactoring (pt has many if statements for VCS ignore files...)