generate slug from title and chomp off enough space for the counter suffix when handling collisions. handles #249

This PR is for #249. My last PR got pretty stale and rebasing was a headache.