Accept pathlib.Path objects for stdout/stderr
Accept pathlib.Path objects for stdout/stderr

Fix #597.
I decided to not add an additional import for `pathlib.Path` and instead check if the object passed is "path-like" according to [PEP-519](https://www.python.org/dev/peps/pep-0519/).
amoffat/sh,amoffat/sh