Check if image is in directory