GATE_EXIT_RUN_DSTAT was defined in scripts library and used in
gate-check-commit. When script library is loaded before using in
gate-check-commit, everything is fine. But when gate-check-commit
is doing upgrades, the checkout of previous branch happens before
the loading of the script library, which therefore loads previous
version of the script library which doesn't contain the
GATE_EXIT_RUN_DSTAT environment variable, and therefore the usage
of this variable fails.
Change-Id: Ica58331d8c63d354561aebefd1b1e26dc2b37ffb