Generalized root path in generate.sh

Generated by commit 2a958d49793ac29f13cfee0fa65159c31990b20e; pushed by Travis build 24.