port_to_spock.sh: some improvements.