Fix permissions to PostgreSQL data directory and add Fig script