Cleaned up pi.py

Added a README file to pi.py.  The core functionality of pi.py was put into
a function which can now be imported into other modules.  Additionally pi.py
can now accept command line arguments.