As far as I can see from the code the card detect pin isn't used anywhere, so I doubt that's the issue...
I'm afraid I can't afford to spend any more time on this myself though... If you want an SD card that works, there's always the Espruino board :)
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As far as I can see from the code the card detect pin isn't used anywhere, so I doubt that's the issue...
I'm afraid I can't afford to spend any more time on this myself though... If you want an SD card that works, there's always the Espruino board :)