fix broken link in readme
update sample code so it compiles

make it a little more friendly for first time cut and paste
Merge pull request #19 from peacemode/master

fix broken link in readme