.rstrip() doesn't do what one would think it does, replace with .rsplit()
.rstrip() will remove, from the right of the string, all the character
it is given, so if you do .rstrip('foobar'), it will remove all 'f', 'o',
'b', 'a' and 'r' from the right hand side of the word.
This is not what we want, we want to remove the `.md` part of the
filename, so let's split on this and get what is in front of it.
Fixes https://pagure.io/pagure/issue/2601
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>