rake/cloud: make server url selection more robust