Improved sanitize_filename