Made compatible with latest tip version of Go in pre 1.1 stabilisation
phase. Mostly involved fixing references to old Go package interfaces.

Interface changes were:
Converted GetInt to GetInt64
WriteConfigFile now takes a uint32 for file permissions (0644)