Fix CWD changing when running a attached server.

Let's do this the dirty way.