bootstrap.sh: fix CC detection

There were two errors in CC detection:

1. The wrong variable was used in the for loop.

2. The selected CC was checked for existence and execute perm,
   but instead of the full path to the executable just the basename
   was passed to test -x.
bootstrap.sh: fix tar reading from stdin