pub fn without_extension(input: &str) -> String
Removes the last simple extension while preserving directory segments.