Add basic ignore pattern support

This fixes lots of issues with `.git` locks and the likes.