Ensure default-directory ends with a slash

See #1431, #1444
Check for existence of working directory when running a process