Fix output path determination, exclude files that do not end with .md from input, regenerate