Add functions for determining if the stdin/out/err is connected to a