Fix duplication of posts

Because some strange bug in php, if you rewind the iterator before foreaching it, the script will duplicate the first entry. This will fix the issue: https://github.com/phly/PhlyBlog/issues/7