Also made a number of improvmements to tt, making it compatible with more shells.
These functions previously operated on the assumption that fgetc() would block; however it will not block on HttpServer streams because those are non-blocking. They now check error conditions properly before failing prematurely.