If the languages folder doesn't exist scandir fails, check if it exists