Sort patch files to ensure correct application order