Regarding:  https://bugzilla.mozilla.org/show_bug.cgi?id=1092375

Why are you cd-ing to `pwd` all over the place?
(If it's because of the commented out sections below that cd somewhere else, then I suggest you make those cd back to `$(TOP)` instead.  Have each section clean up after itself, right?  :)