Fixes up a bunch of issues found during debugging

* Simple things like leaving off Content-type were causing
  cascades of failures, making this difficult to debug
* Changes the bootstrap bash script to be idempotent for
  all changes, so if something fails for only one component,
  subsequent runs will be fine.