Enhance/fix `isatty` using `command test`.

Presently, `isatty` only works on a handful of keywords. Here it is rewritten to be able to take any path, device or `fd` number as an argument, and eliminates errors printed to stdout.
Per discussion in #1228, using `builtin test -c` within a pipe to test special file descriptors is not viable, so this implementation specifcially uses `command test`. Additionally, a note has been added to the documentation of `test` regarding this potential aberration from the expected output of the test utility under the 'Standards' section.