Sorts files by name, to prevent older files overwriting newer version