build.sh: Check if parameter is a valid chapter number