Change cwd to %HOME% before executing command.
Revert "Use sleep instead of ping."

This reverts commit 3f1064b22d4ebb2223a9e82cd0a59c0191e6dc13.