Clean up _getFileExtension() method and fix all its callers

* Addresses final comments from code review for https://github.com/adobe/brackets/pull/4846
* Fixes #4575
* Fixes #5080