Allow collections YAML to end with dots

Posts can have YAML front matter that ends with three dots instead of dashes since 52ac2b3 but that only applies to posts. This PR adds the ability for the YAML front matter of collections files to end with dots as well.

I don't have very much experience in writing ruby code and tests, but I managed to write one. It probably can be improved but I just don't have enough experience to know how to do that yet.