Added .gitignore file & fixed permissions.

Added list of filename patterns to be ignored by Git.
Removed execute permissions from C++ sourcefiles & CMakeLists.txt