Report output ccache errors when getting initial creds

Two small commits, one to fix the bug and one to add a test.