Correctly selects filename when known extension with a dot inside is used

Follow up for https://github.com/adobe/brackets/pull/7209 in case we wanted to get fancy :-)

This is for #7265