updated tests and README. added error checking to gethostname() and getlogin()