Update psub for the new --inherit-variable flag

Also do some minor formatting cleanup, make psub return 1 when executed
outside of a command substitution, and make it respect $TMPDIR.
Clean up prompt_pwd with the new function -V flag

Also fixes `cd /private` displaying as no path on OS X.