Rebased config.go from mitchellh/packer.