README code sample touch ups

This PR updates the README:

* Formats the code sample blocks in markdown so that GitHub renders them as code (with whitespace preserved, etc.)
* Fixes a syntax error in one of the code sample blocks