Dot printing

I implemented the stuff I requested at https://github.com/sympy/sympy/pull/1794. Don't merge until I get the repeated commit in. 

Once you merge this, I am +1 to merging your pull request into master.