Fix code examples

Looks like there was a typo and an incorrectly scoped `app_root` variable, so those are both fixed.