I would suggest to change this in the following way: to have a parameter to specify the XSD directory (e.g. "--xsd-dir"). If the parameter is found, then XSD_DIR is updated properly. If the parameter is not found, then use `mktemp -d` for XSD_DIR and download the XSD to that directory (in this case, this XSD_DIR will be removed in the cleanup step).