Fixing PostgreSQL Import Support

Does this, also fixes a bug where it would try to gunzip a naked SQL file and fail, then truncate .sql from the filename.