Updated to the latest version of go

Updated to the latest tip version of Go which is in pre-1.1 stabilisation

Changed 2 interfaces, GetInt is now GetInt64 and WriteConfigFile now takes a uint32 as the file permissions.

Error messages have been cleaned up to be more informative and consistent.

File was formatted using go fmt.