Clean up _getFileExtension() method and fix all its callers

Fixes [#4575](https://github.com/adobe/brackets/issues/4575)

I've taken into account comments on [this](https://github.com/adobe/brackets/pull/4651) pull request and fixed it.