Check for directory traversal in getTemplateName

Prevents traversal from the provided templateDir outside of it.
Uses same conditional as MediaWikiTitleCodec::splitTitleString

Change-Id: I15d32d0327ec285a0098232c1cfdc5c8b2f1f3fc
Documentation: Parameters to diffRevision template helper

Change-Id: I95d266161f213aa71f795ff3932b9c421e3cb30d
Merge "Documentation: Parameters to diffRevision template helper" into frontend-rewrite
Merge "Check for directory traversal in getTemplateName" into frontend-rewrite