Git Build: support submodules during checkout and merge

also, clean the directory before building.