@Pluto
about using CHDK-Shell:
I suggest you clone your untouched SVN source first (double rectangle symbol left of build version) and apply your modifications on that.
Original and modded versions will be in completely separate directories that way - that should make sure the way directories are cleaned has no influence on your binaries.
Could you try that, please ?
wim
PS Also note, that there's no need to change your PATH to use CHDK-Shell: it uses a cmd batch file to control compilation, which allows it to change/restore the path on the fly without influence on the PATH seen by other applications.