utils: Do not append a period unless we end with text

If the documentation block ends with something that is not a letter then
it's likely we're going to break something, like a code block marker.
3 jobs for 2021.6 in 1 minute and 44 seconds
latest
Status Job ID Name Coverage
  Check
passed flake8 #1322274

00:01:34

failed mypy #1322275
allowed to fail

00:01:44

passed reuse #1322276

00:01:35

 
Name Stage Failure
failed
mypy Check
gidocgen/gir/parser.py:982: error: Argument "get_type" to "GType" has incompatible type "Optional[str]"; expected "str"
gidocgen/gir/parser.py:1004: error: Argument "name" to "Union" has incompatible type "Optional[str]"; expected "str"
gidocgen/gir/parser.py:1004: error: Argument "symbol_prefix" to "Union" has incompatible type "Optional[str]"; expected "str"
gidocgen/gir/parser.py:1004: error: Argument "ctype" to "Union" has incompatible type "Optional[str]"; expected "str"
gidocgen/gir/parser.py:1006: error: Argument 1 to "set_version" of "GIRElement" has incompatible type "Optional[str]"; expected "str"
gidocgen/utils.py:808: error: Need type annotation for 'found_programs' (hint: "found_programs: Dict[<type>, <type>] = ...")
Found 206 errors in 4 files (checked 16 source files)
Cleaning up file based variables
ERROR: Job failed: exit code 1