fixed demo script bug for empty gh-pages

Now the demo script will run its course even if gh-pages is empty.