when automating test execution, some environments don't have a tty which causes the tests to fail. df is just as good a test as stty as it is also guaranteed to be present. This change also allows the tests to be run on OSX