html_last_updated_fmt option is interpreted as a
byte string in python3, causing Sphinx build to break.
This patch makes it utf-8 string.
In addition, changing Popen to check_output because
check_output() will raise CalledProcessError if the called process
returns a non-zero return code.
It also makes the code look much better.
Change-Id: If01f08216b4b252bd31029913e83fe945bf76866
Closes-Bug:#1693670