Solution for listing files of the same extension inside a directory.