build.xml: Fix clean when no source-gen

In its previous form, the 'clean' target would fail if source-gen hadn’t
been run (due to the .gitignore file missing). Fix that by deleting
generated files only if that .gitignore exists.

Reported by @tombentley and @davidfestal, solution suggested by
@davidfestal. Thanks!