Handle directory conflicts with html output.

When calling html_report() if the output path already exists
instead of rewriting the files in the directory html_report
throws OSError: [Errno 17] File exists which leads to a 500
return to the api call. This commit avoids this issue by
checking if the directory exists beforehand and returning a
400 with an error message instead.

Change-Id: I061534c9ce9977692a7fc98187c4797b2ed60ab2
Merge "Handle directory conflicts with html output."