[JENKINS-14575] Wrap GitException into IOException

Do the same if the repo exists and don't have to clone.
Ignore .idea folder (IntelliJ)