BugFix(md.py): md --autooutput chooses wrong output filename

  -- fname.strip('.md') should be fname[:-3]
     (guarded by an if endswith('.md'))