Two fixes to generated setup.sh, mainly around #57

for review (if travis tests succeed)