even when you're booting from SD, you can still mount the SD card and read/write files.
While the board is booted, mount the sd card
mount /dev/mmc* /media/card (should be mmcblk0p1 or something like that)
copy the sketch file to the SD card
cp /sketch/sketch.elf /media/card
unmount SD card
umount /media/card
then you can stick the card in your PC and get the sketch.