build: Add simple doctest check

Only run doctests if the file seems to contain a doctest.

Change-Id: I3e8019b39a96361f4e3d48f3a195a738f0f056b4
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>