You are given a list of files. You need to sort this list by the file extension. The files with the same extension should be sorted by name.
Some possible cases:
- Filename cannot be an empty string;
- Files without the extension should go before the files with one;