Fixed issue with regex not properly handling dot in file names without e...

...xtensions

Here is a link to test the regex http://regex101.com/r/iI6oQ0/2