Read file extensions properly

A Fix for https://github.com/adobe/brackets/issues/8042