modpi - initial revision

to fix https://github.com/JuliaLang/julia/issues/2524

see here for an overview and testing: http://nbviewer.ipython.org/7443293