Fixed issue with errors on position field on broken templates

Tracker item: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30332

When a template's xml cannot be found or has errors, the foreach loop throws an error (because $positions will be 'false' and not an empty array).
This should fix that. It will also prevent templates showing up in the list that have no positions.

#### Testing Instructions
Break a templates templateDetails.xml file by - for instance - renaming it, or making sure there is no <extension> (and <metafile>) as root xml tag. Then see if you get an error in the module edit views (of course with error reporting switched to maximum).
Then apply fix and check again.
Do the same by editing the templateDetails.xml file and stripping out (or emptying) the <positions> tag.