Fix error handling, also migrate to go1.3

Hmm, does that explain why it intermittently worked?