Checkout branch at clone and don't escape string

- Checkout the correct branch at clone rather than running an extra
  shell command to switch branch
- Remove shellescape as `FileUtils` will escape by default and this
  would double escape causing failures