Instead of writing to the current working directory, pick a random temp
directory to test the CLI commands, keeping the working directory free
of test side effects.
In some cases the system default temp dir will also have some advantages
like being mounted in an in-memory tmpfs.
* fix: ensure that testproject is removed even after a failure
* fix: defer licenseFile
* style: simply defer os.RemoveAll
* cobra/cmd: add getProject test func
These tests were time-dependent and would start failing in 2018
when the golden files still have the copyright year of 2017.
Fix by hard-coding the year 2017 for the purpose of these two tests
to ensure reproducible builds.
Fixes#503