Improve GOPATH setting algorithm