Follow-up fix for issue #235, deal with '/' when adding trailing slash
Merge pull request #237 from humphd/issue235-followup

Follow-up fix for issue #235, deal with '/' when adding trailing slash