Rebuilding Nikon batteries, that sounds like an interesting story by itself for the What the Nerds Do section. Regarding the main question, you might want to take a look at the the following topic : Nikon Cameras in the Cold,
http://nikongear.net/revival/index.php/topic,494.0.html Short answer: While all is relative with respect to subjective perception of cold, for the camera -5°C to -7°C is not very cold with respect to mechanics and the battery performance. A slight decline in effective battery capacity is expected, especially at higher power drain (increase in internal resistance of the battery). At -20°C during the eclipse I was using the same EN-EL15 battery through about 150 exposures with live view active most of the time and plenty of previewing images. (Heat from the active live view might actually have helped; during astro-photography with repeated 1 minute exposures I can track for about 2 hours at similar temperatures before changing battery.) The D5100 needed a battery swap even with minimal use after 1 hour, but the initial battery was not fully charged as I recall.
Below -30°C and certainly when it goes down to -40°C, the battery looses apparent power when it cools down and may eventually appear to be empty. However most of that effect is reversed when the battery is rewarmed. So the solution is to have at minimum one spare battery that is kept warm inside the clothing and can be swapped in when the other one has cooled down too much. Thus one can keep going for quite a while with just two batteries. When going out, but not immediately using the camera it also helps to keep it in a closed bag or a holster, which will slow down cooling. It might then take a couple of hours before it is cooled all the way down to ambient temperature, depending on thermal mass of the camera and the battery. The thinner batteries tend to cool down a bit faster. But again, it needs to be quite cold before these measures are needed.
Edit: A thought is that an empty battery usually does not result in an ERR message, just a blinking battery symbol. It could have been caused by a poor electrical connection to the lens, and then with slightly lower battery voltage the lens did not receive enough power. (Keeping shutter open for extended periods tend to drain more power.) Or the temperature effect could have been direct on the lens contacts causing a bad connection.
Edit2: If the battery goes too low during long night sky exposures (typically 1 min) I have sometimes seen the ERR message, especially if the remote keeps trying to fire the shutter. I think in some instances it was caused by the mirror not returning and needed a new shutter activation with a fresh/warm battery to return.
Edit 3: I checked my D5100 batteries (EN-EL14) after warm up - unfortunately I got them a little confused. 2 were full, while one only showed one bar. I suspect that is the one that needed to be swapped out, but I am not sure. The EN-EL15 from the D7100 was 2/3 full after warm-up.