Fixed exceptions, when using UNIX Socket

Password must be casted to type string-None is not allowed there. Host also must be string, therefore to use UNIX Socket it shouldn't be passed as a param.
Tested on postgresql 9.2 and Debian Squeeze.