Revert "Do not use temp directory to install go"

This reverts commit ab81dbf832e9d3e93a6ab149c5ac3e7d179907d1.