Set GIT_PREVIOUS_COMMIT env var to sha1 of previous built revision

This can be useful for generating a list of changed files from the previous build. Such a list can be handy for creating incremental builds.