fix MediawikiTemplate::getTitle() method

* set $file_extension_length to an initial value of 0
* modified the title max length test so that it actually tests the
  working title’s strlen()

Bug: 64086
Change-Id: Ic964f214ce80d707c9d76140f8f9749aaf1b1d72