Some fixes to use MOZ_UPLOAD_DIR instead of output-to-stdout hackery.