pub fn validate_filename<'a>(name: &'a str) -> Result<()>
Ensures the filename has no trailing spaces or dots.