Fix up AppIdentity class

cc @murgatroid99
Fix some test related issues

Make tests set time and work from root. Fixed #365 and #367
Fix lint errors in examples and src/

CC @silvolu - needed some munging, but lint bashed these,
Lint bash tests

cc @silvolu
Fix oauth helper
Merge pull request #368 from ianbarber/master

Lint bash and small fixes