Make permalink parsing consistent with pages

Require permalink to end in a slash to write an index file.
Addresses #2920.
Update Cucumber tests to match new permalink parsing
Merge pull request #2921 from alfredxing/post-dest