Safer way to invoke subprocess to get cwd

The use of double quotes is safe for simple expressions like we use.
Test::Harness uses a similar thing.  Also prints with a newline
and chomps in case some strange system bites us with buffering.