cli: build: Do not produce empty json file
When the build's status is empty which can occur in two scenarios:
- When the cli time's out
- When the status fetch fails, due to network error or unavailability of tuxapi endpoint
Then, do not write a json file when --json-out is requested.
Signed-off-by: Senthil Kumaran S senthil.kumaran@linaro.org