Add helpers to handle warnings

Formatting errors and returning them correctly takes a lot of lines of
code which is pretty annoying when there is more error handling code
than useful code.

So we write some functions to help with handling them and notice that
they all have the same 'tail' at the end of the errors so we extract
that into the helper as well to reduce line length in the main code.
Catch getmtime error when finding elements

We convert the generic OSError to an MTimeError which we catch up top
and convert to a warning using the new helpers.
Add sphinx instance to test warnings

We don't want our actually documentation throwing any warnings so we
fake them in the docs. So we add this sphinx instance to only fire
invalid doxygen directive calls which will error. The idea here isn't to
make sure everything fails (as that'll get lost in the noise, though
it'd be good to make sure) but rather to check that none of the failures
throw exceptions that crash the build process.

Born from the desire to test the helper code that is handling the
warnings to make sure that we're not breaking anything as we try to
stream line it.
Merge branch 'warnings'