Handle routes without trailing slash. Exit with 1 if there's a build error.