Don't use .lower() on filename and ext