List all images from a directory, what's wrong?