Added .gitignore for Makefiles, CMake autogenerated stuff and binaries.
Fixed windows not closing normally.