Make setup-{bin,link} more robust