Use case-insensitive regex for file extension matching.

Based on #343, this makes the regular expression for matching file extensions case-insensitive so `.rmd` and `.Rmd` both work.

@gjtorikian @vmg @ymendel see any problem with this?