fixed installation issues on MacOS X

1. BSD sed on MacOS X interprets "-i" as a file if placed at the end, hence the "sed: -i: No such file or directory" errors.

2. When using MacPorts and the Python/PostgreSQL ports, the correct includes to be used are in /opt/local/include. Using pythonX.Y-config and pg_config instead of hardcoded directories resolves that.

Beware that I reused a get_pg_config function from psycopg2 but haven't checked licence compatibility.

--
fixed sed -i issues on OSX (bug #1154)
fixed hardcoded /usr/include/{postgresql,python} directories in Makefile and setup.py
adjusted .gitignore