Changed typo 'dataname' to 'datname', which fixes
a fatal bug when the script is invoked without --databases.