.gitignore cleanups

Remove the hard-coded XCode paths from the /.gitignore file, move to pattern-matched ones instead contained within the macosx directory instead.

Also add a ignore for the build/ directory, mainly for Linux users.