1. How do I get the root folder of the SD card?
The root of the filesystem is A/
Note the / is part of the name. For any other directory, you should not put a / at the end.
2. Is it possible to write some simple txt-file using CHDK into the root folder (or any other directory) of the SD card?
Yes. Just use, fopen, fwrite and fclose like you would on any other OS.