Added support for version 3.1. Changed the downloaded zip archive to use tags instead of a branch, since we now use maintenance branches with names like 3.x, which would not match a specific version going forward.