This creates a simplified helper for temporary directories and files.
All path names are prefixed with the name of the current test.
All files and directories are stored either in /tmp/consul-test
or /tmp if the former could not be created.
Using the system temp dir breaks some tests on macOS where the unix
socket path becomes too long.
Passing in an empty quoted argument from the shell currently panics as
we never check the length being greater than 0 prior to indexing into
the first rune, as illustrated in the test in this commit.
We also fix the panic, treating an empty string for data as equivalent
to not having passed it in the first place.
This commit adds a -base64 option to the consul kv put command, which
base 64 decodeds the data prior to writing it. This can be used in
conjunction with `consul kv get -base64 key`.