fix missing variable error (global var abuse)
fix shebang

XXX all shebangs '/usr/bin/php5' or using '-f' need to be fixed
fix dropping the schema when the wiki name has ‘-’
handle protected and private slots of PHP objects in JSON export