I haven't noticied this thing before, but that's something we may want to take look at.
The path to build_stage is hardcoded in there. Also it generates a gaia_shared.json that ends up unexpectedly in application.zip. That's a r.js script. We will really have to look into them at some point!
This script looks like a workaround to webapp-zip.js. If webapp-zip isn't smart enough to detect shared files, so may be we should improve it for all apps instead of doing this app-specific script and copy paste it between clock and email :'(
(like many other comments I had in this pull request, that is beyond the scope of this patch. Consider this as some tips on what we could improve in our build system.)