Fix uptime parsing, and do some error checking when parsing system information

Uptime parsing no longer causes an exception if the uptime is less than 1 day,
which also fixes a unit test failing. Some sanity checks have also been added
to the similar routine for parsing df output.