Made the capture_image function handle repeating, and flash *before* taking a photo.