Fix minor bugs in ping; add the most basic test.
Merge pull request #11 from mbelshe/master

Fix minor bugs in ping; add the most basic test.