git-am-tool.sh: Fix running with already in-progress am

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
check-title.py: Always capitalise first + last word & refactor

In English, the first and last words of a title should always be
capitalised regardless of any other rule. E.g. The "On" in "On the
Meaning of Life" is supposed to be capitalised.

Also refactor the code while I'm at it.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>