Ensure directory exists before changing in popen

If the directory does not exist, we want to ensure that it does.

Forking repos will fail in some situations because of this issue.
Whitespace fixes to patch
refactor omniauth configuration method

This refactoring allows a user to use omniauth providers which do not
use ```app_id``` and ```app_secret``` without needing to change the
devise configuration.
Merge branch 'master' into dont-depend-on-appid-and-appsecret

* master: (238 commits)
  Version 6.5.1
  Fix selectbox when submit MR from fork to origin
  Fix HELP layout
  No need for code tag here.
  Spelling mistake and add links.
  Warn against RVM.
  Remove GitHub mention because we also have a GitLab issue tracker now.
  Replace 6.0-to-6.4.md with 6.0-to-6.5.md
  Add public assets to gitignore
  Version 6.5.0
  Use 6-5 branch in installation docs
  Remove deprecated twitter handle.
  Further explain userPrincipalName settings
  Update from 6.4 to 6.5 guide
  Explain how to use AD userPrincipalName for logins
  More entries to CHANGELOG. Version to rc1
  Rephrase LDAP check script output
  add O'Reilly sponsorship in CHANGELOG
  Fix select2 css for drop above style
  Rename "Website url" labels to "Website"
  ...
Allow issues to be viewed for authenticated user when project is public or internal.
changed h3, h4 markdown font sizing to match markdown spec -- h3: 1.5em, h4: 1.2em
Merge pull request #5957 from ninech/dont-depend-on-appid-and-appsecret

refactor omniauth configuration method
Merge pull request #6218 from brittlewis12/master

fixed h3, h4 font-sizing for gitlab-flavored markdown (solves issue #6211)
Feature visit issues page for public project as auth and non auth user.
Feature for visit issues page for internal project as auth user.
Scenarios for checking if MR are shown for internal and public projects.
Bump gitlab_omniauth-ldap gem

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
remove remaining python references
Merge pull request #6227 from jojosch/remove-python-doc

remove remaining python references
Extract projects and mr into methods in features.
Do not load all projects all the time.
Enable markdown formatting for snippets in projects.
Use recent gitlab_git lib

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Use new tags/branches from gitlab_git

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Filter items by project.