Following symlinks and checking if the files are actually images