Fixing *HelperRoute classes

This is the PR to this 3.1 PR and Bug:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8103&tracker_item_id=31107
https://github.com/joomla/joomla-cms/pull/1560

Testing is the same as for 3.1