Added module to clear and restore errno via scope.
Added module to check if a fd is valid.
Implemented file descriptor stream.