Move working-dir related code into setup_workspace

Addresses issue #193