Use functions for checking if a file or dir exists in xcd.c.
Modify xcd.bat to work with new xcd.exe.
Do not use parameter bindings, directly construct the SQL query with printf.
xcd.exe now writes to the temp dir changer file itself, instead of xcd.bat doing it.
Add a CHECK macro to simplify error handling.
Make use of the CHECK macro.
Use more standard brace style.