fix cwd on unix (cherry-pick upstream bugfix)
fix #6312 (restore old repl history behavior)
Merge branch 'master' of https://github.com/JuliaLang/julia into appveyor