Transfer ownership of sql files to postgres and fix file names of .so libs.