factor common code out of the two permutedims!
Merge branch 'master' of github.com:JuliaLang/julia
small formatting changes