Change log.Fatal* to log.Panic*

log.Fatal* are exit the program using os.Exit(1).
But they don't call the deferred functions.

See http://golang.org/pkg/log/#Logger.Fatal and http://golang.org/pkg/os/#Exit
Fix TemplateSet.Ident
Add tests