Changed regular expression match for extensions to insert '$'

This fix addresses the issue by anchoring the match for extensions like
'ad' to the end of the line, preventing it from matching files like
.jade.