Strip .md suffix from filename when creating files to prevent
filename.md.md from being created. This aligns with the behavior
in FileHandler which also normalizes filenames from URLs.
Fixes issue where files created with .md extension could not be
deleted due to filename mismatch.
Initialize files slice with make() to ensure JSON serialization
returns [] instead of null when no files exist. Prevents frontend
TypeError when calling .map() on null.