Support ignore patterns that begin with an escaped hash character

https://www.kernel.org/pub/software/scm/git/docs/gitignore.html#_pattern_format
Change patterns to use braces to support hashes in the pattern