I added a simple change to the SD library to help with this issue. I have not tested it fully yet but it may be of interest to know that the SD library has a begin() but no matching end(). I implemented:
void SDClass::end() {
if (root.isOpen())
{
root.close();
}
}
This allows you to close the SD library. Also I am using an N-Channel FET in the ground of the SD card (BS170 Drain connected to SD card gnd, BS170 Gate connected to 10K to ground and Arduino digital IO pin, BS170 Source connected to ground). When I wish to switch off the SD card I tristate all the SD card connections and then I tristate the FET Gate pin. The 10K resistor forces the Gate to 0v and all the pins on the SD card float to Vcc. Next step is to switch off the SPI module in the processor and take the power consumption down further.
Switching back on is easy but this time to switch on the power to the SD card put the FET Gate pin to HIGH. This forces the FET full on and with its low Drain - Source resistance puts power back on to the SD card. It all seems to work but I have not measured the off current and I still have to put the processor to sleep.