Shell::{POSIX,mksh,fish}: fix WorkingDir for ~

When in the home directory, the directory name returned by the
WorkingDir sub was not replaced by '~'.