Trap log-0 exception for some valid data
Removed unecessary cleanup
Test for empty file
remove diagnostic print
Suppress output for invalid data
Added new testing cases
Changed to argparse
Changed structure to accomodate std input.
removed dependency on math, re
Added description to test script
Changed urllib to urllib2
Prettying source code