Added build directory to gitignore
Fixed bug on mac os x10.7
added compatibility for 10.7