Updated xcconfigs to allow setting of SDKROOT successfully to 10.4 / 10....

...5 and 10.6 (10.7 untested).

Added more build folders to .gitignore
Fixed compiler errors when compiling with SDKROOT > 10.4