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.
Merge pull request #9082 from mscherer/fix9080/file_not_working_py24

Make file module work on python 2.4, fix #9080
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.