Fix demo code

Fix the provided examples so that they run with the latest Google App Engine SDK.