Expose preexec_fn from ptyprocess

* Update our use of ptyprocess for single function preexec_fn parameter. Requires ptyprocess master until I make a new release.
* Add preexec_fn parameter to `spawn()` and pass it through to ptyprocess.