MacOS X installation patches

fixed sed -i issues on OSX
fixed hardcoded /usr/include/{postgresql,python} directories in
Makefile and setup.py
adjusted .gitignore