Remove trailing space after print
Simple solution for command line interface testing

* The priciple is to keep using doctest. We replace '$>' by '>>>' and then
  call subprocess.check_output to call the command line from Python
* All the command line use cases are put into cli.rst and validated using this
  approach
Merge pull request #167 from yuancheng2013/test_cli

Test command line interface and remove trailing space after print