Fix extension handling.

svn path=/trunk/tools/build/v2/; revision=83802