Fix CLI script and errors in JUpdater

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30815&start=50