CSPACE-5939: Script to extract queries now accepts command line options, including logfile name, and creates output directory for SQL queries.