Adding .gitignore file to ignore target dir, .idea(IntelliJ IDEA project files) dir and OS generated files
Applying changes as per patch from https://issues.jenkins-ci.org/browse/JENKINS-8004