New title logic

Title now is taken from the Title meta keyword, and if not present, the
first header available. If no headers are available, then the title is
the file name.