replace status with status_code as defined by requests API

Move this statement in `else` clause to make sure the try except block doesn't catch
coding errors.
A ping should be successful if status_code is less than 400
Merge pull request #157 from ticosax/ping-fixes

Ping fixes