submodules in a git url are now updated pre-build

The problem this solves is not being able to build dependencies included
as git urls in package.json that have git-submodules themselves.

This fix uses git-clone --recursive (with working-tree) instead of
git-archive to package such dependencies as node_modules. It's not as
clean, leaving behind working-trees and taking up more space, but I
don't think it can get much better until git-archive supports submodules
natively.

I also saw a lot of senseless coupling of the log messages with the
commands being run, so included a logCmd function to make logging the
git commands more maintainable. I've only made use of it in the scope of
my changes, but something similar should be used throughout the file, if
not the entire module.