Make postgresql:create_database task more robust