Use getopts to print help and to parse script arguments.
Correct the script that regenerate the nginx map and regenerate the map.
Correct the script for nginx.
chmod +x d7-generate-nginx-map.sh
Correctly generate map from sites.php.