Small fix to build script & .gitignore

Build script now checks if the build directory exists before building
.DS_Store files added to .gitignore