fixed demo script bug for empty gh-pages

Before running the demo script would fail if gh-pages was empty. Now it still gives an error but completes its work.