Replace call to grunt.util.spawn with exec

grunt.util.spawn messes up the character encoding, which can
make the git commit IDs be incorrect, and break the generated
file names.