Fixes #1. Returns non-zero exit status on error.

Errors captured are
1) Socket timeout
2) Any error sent by the tftp server.