Make file module work on python 2.4, fix #9080

Python 2.4 do not support "except ... as ..." construct, so
revert back to the older syntax.
Adds a login_unix_socket option to the postgresql_db module.
Adds a unix_socket/login_unix_socket option to the postgresql_user module.
Adds a login_unix_socket option to the postgresql_privs module.