Fix bug in file extension comparison

The previous match string for file extension comparison didn't escape the dot
'.' character so that it was interpreted as 'any character'