Automatically import fmt and io packages.

This pull request automatically imports `fmt` and `io` packages. If they're imported by a template then they'll simply be deduped out.

/cc @boourns