Fix script name print and sql-defaults path